Experiment Node

orion.core.evc.experiment – Experiment node for EVC

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=())[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 ExperimentView.

.. seealso::

TreeNode for tree-specific attributes and methods.

Methods

add_children(*nodes) Add children to the current node
drop_children(*nodes) Drop the children of the node, do nothing if no parent
drop_parent() Drop the parent of the node, do nothing if no parent
fetch_lost_trials() See orion.core.evc.experiment:Experiment._fetch_trials()
fetch_noncompleted_trials() See orion.core.evc.experiment:Experiment._fetch_trials()
fetch_pending_trials() See orion.core.evc.experiment:Experiment._fetch_trials()
fetch_trials() See orion.core.evc.experiment:Experiment._fetch_trials()
fetch_trials_by_status(status) See orion.core.evc.experiment:Experiment._fetch_trials()
map(function, node) Apply a function recursively on the tree
set_parent(node) Set the parent of the node
adapter

Get the adapter of the experiment with respect to its parent

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:Experiment._fetch_trials()

fetch_noncompleted_trials()[source]

See orion.core.evc.experiment:Experiment._fetch_trials()

fetch_pending_trials()[source]

See orion.core.evc.experiment:Experiment._fetch_trials()

fetch_trials()[source]

See orion.core.evc.experiment:Experiment._fetch_trials()

fetch_trials_by_status(status)[source]

See orion.core.evc.experiment:Experiment._fetch_trials()

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.

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.

tree_name

Return a formatted name of the Node for a tree pretty-print.

orion.core.evc.experiment.adapt_trials(trials_tree)[source]

Adapt trials recursively so that they are all compatible with current experiment.