openfl.component.director.experiment.ExperimentsRegistry
- class openfl.component.director.experiment.ExperimentsRegistry
Bases:
objectExperimentsList class.
Methods
Add experiment to queue of not started experiments.
Finish active experiment.
Get experiment by name.
Context manager.
Get list of experiments for specific user.
Remove experiment from everywhere.
Attributes
Get active experiment.
Get queue of not started experiments.
- property active_experiment: Experiment | None
Get active experiment.
- Returns:
Union[Experiment, None] – The active experiment if exists, None otherwise.
- add(experiment: Experiment) None
Add experiment to queue of not started experiments.
- Parameters:
experiment (Experiment) – The experiment to add.
- finish_active() None
Finish active experiment.
- get(key: str, default=None) Experiment
Get experiment by name.
- Parameters:
key (str) – The name of the experiment.
default (optional) – The default value to return if the experiment does not exist.
- Returns:
Experiment – The experiment with the given name, or the default value if the experiment does not exist.
- get_next_experiment()
Context manager.
On enter get experiment from pending_experiments. On exit put finished experiment to archive_experiments.
- get_user_experiments(user: str) List[Experiment]
Get list of experiments for specific user.
- Parameters:
user (str) – The name of the user.
- Returns:
List[Experiment] – The list of experiments for the specific user.
- property pending_experiments: List[str]
Get queue of not started experiments.
- Returns:
List[str] – The list of pending experiments.
- remove(name: str) None
Remove experiment from everywhere.
- Parameters:
name (str) – The name of the experiment to remove.