Experiment Node¶
Experiment node for EVC¶
Experiment nodes connecting experiments to the EVC tree
The experiments are connected to one another through the experiment nodes. The former can be created
standalone without an EVC tree. When connected to an ExperimentNode
, the experiments gain access
to trials of other experiments by using method ExperimentNode.fetch_trials
.
Helper functions are provided to fetch trials keeping the tree structure. Those can be helpful when analyzing an EVC tree.
- class orion.core.evc.experiment.ExperimentNode(name, version, experiment=None, parent=None, children=(), storage=None)[source]¶
Experiment node to connect experiments to EVC tree.
The node carries an experiment in attribute
item
. The node can be instantiated only using the name of the experiment. The experiment will be created lazily on access to node.item.- Attributes
- name: str
Name of the experiment
- item: None or :class:`orion.core.worker.experiment.Experiment`
None if the experiment is not initialized yet. When initializing lazily, it creates an Experiment in read only mode.
- .. seealso::
orion.core.utils.tree.TreeNode
for tree-specific attributes and methods.
Methods
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
fetch_trials_by_status
(status)See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
recurvise_fetch
(fun_name, *args, **kwargs)Fetch trials recursively in the EVC tree using the fetch function fun_name.
- property adapter¶
Get the adapter of the experiment with respect to its parent
- property children¶
Get children of the experiment, empty list if no children
Note
The instantiation of an EVC tree is lazy, which means accessing the children of a node may trigger a call to database to build those children live.
- fetch_lost_trials()[source]¶
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
- fetch_noncompleted_trials()[source]¶
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
- fetch_pending_trials()[source]¶
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
- fetch_trials()[source]¶
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
- fetch_trials_by_status(status)[source]¶
See
orion.core.evc.experiment.ExperimentNode.recurvise_fetch()
- property item¶
Get the experiment associated to the node
Note that accessing
item
may trigger the lazy initialization of the experiment if it was not done already.
- property parent¶
Get parent of the experiment, None if no parent
Note
The instantiation of an EVC tree is lazy, which means accessing the parent of a node may trigger a call to database to build this parent live.
- recurvise_fetch(fun_name, *args, **kwargs)[source]¶
Fetch trials recursively in the EVC tree using the fetch function fun_name.
- Parameters
- fun_name: callable
Function name to call to fetch trials. The function must be an attribute of
orion.core.worker.experiment.Experiment
- *args:
Positional arguments to pass to fun_name.
- **kwargs
Keyword arguments to pass to fun_name.
- property tree_name¶
Return a formatted name of the Node for a tree pretty-print.