drytorch.core.registering
Module registering models and records when they are called.
Actors and models are registered in global variables that keep track of the experiments at the time of calling. The experiment must be the same. Then the Experiment class is called to create the log events.
- ALL_MODULES
A dictionary that maps module references to experiments.
- Type:
Final
Functions
|
Register an actor in the current run. |
|
Register a module in the current experiment. |
|
Unregister an actor from the current experiment. |
|
Unregister a module and all its actors from the current experiment. |
- register_actor(actor: Any, model: ModelProtocol[Any, Any]) None[source]
Register an actor in the current run.
- Parameters:
actor (Any) – the object to document.
model (ModelProtocol[Any, Any]) – the model that the object acts on.
- Raises:
ModuleNotRegisteredError – if the module is not registered in the current experiment run.
- Return type:
None
- register_model(model: ModelProtocol[Any, Any]) None[source]
Register a module in the current experiment.
- Parameters:
model (ModelProtocol[Any, Any]) – the model to register.
- Raises:
ModuleAlreadyRegisteredError – if the module is already registered.
- Return type:
None
- unregister_actor(actor: Any) None[source]
Unregister an actor from the current experiment.
- Parameters:
actor (Any) – the object to document.
- Return type:
None
- unregister_model(model: ModelProtocol[Any, Any]) None[source]
Unregister a module and all its actors from the current experiment.
- Parameters:
model (ModelProtocol[Any, Any]) – the model to register.
- Return type:
None