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