Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Future

Placeholder: create a component instance from archive.

Placeholder: create a component instance from archive.Full instantiation requires dispatching on both component kind and on-archive precision and is currently unimplemented. This method demonstrates the scoped read pattern and throws on invocation.

Implementation Strategy:

  • Push scope "components/<name>"
  • Read meta/config/tensors using relative paths
  • Dispatch to the concrete Component<...>::fromArchive_ factory
  • Return properly typed component instance
Parameters
archiveModelArchive containing serialized component
component_nameName of component to instantiate
exec_contextExecution context for the component
Returns
Shared pointer to component (placeholder type)
Exceptions
std::runtime_errorAlways throws - dispatch not yet implemented
Note
Returning std::shared_ptr<void> is an intentional placeholder type — replace with the project's chosen type-erased component handle once the dispatch plumbing is implemented.

usage pattern:

auto component = ComponentFactory::createFromArchive<DeviceType::Cpu>(
archive, "fc1", exec_context);