src.internal.experiment_connector.connector module#

Provides a base class for all experiment connectors to inherit from.

class src.internal.experiment_connector.connector.ExperimentConnector[source]#

Bases: ABC

Base class for experiment connectors.

_abc_impl = <_abc._abc_data object>#
abstract property artifacts: Dict[str, Artifact]#

Returns artifacts associated with experiment

Raises:
  • ValueError – If not currently connected to any experiments

  • NotImplementedError – If experiment connector does not implement this method.

Returns:

Mapping of artifact names to artifacts

Return type:

Dict[str, Artifact]

abstract classmethod clone(exp_id: str, clone_name: Optional[str] = None) ExperimentConnector[source]#

Clone an existing experiment.

Parameters:
  • exp_id (str) – Id of experiment to clone

  • clone_name (Optional[str], optional) – Name of cloned experiment. Defaults to None.

Raises:

NotImplementedError – If experiment connector does not implement this method.

Returns:

Cloned experiment connector

Return type:

ExperimentConnector

abstract close()[source]#

Close the experiment connector.

Raises:

NotImplementedError – If experiment connector does not implement this method.

abstract property config: Dict#

Returns config associated with experiment

Raises:

NotImplementedError – If experiment connector does not implement this method.

Returns:

Configuration of experiment

Return type:

Dict

abstract delete() bool[source]#

Delete the experiment.

Raises:

NotImplementedError – If experiment connector does not implement this method.

Returns:

True if experiment was deleted, False otherwise

Return type:

bool

abstract classmethod get() ExperimentConnector[source]#

Get an existing experiment.

Raises:

NotImplementedError – If experiment connector does not implement this method.

Returns:

Experiment connector

Return type:

ExperimentConnector

abstract property models: Dict[str, Artifact]#

Returns models associated with experiment

Raises:
  • ValueError – If not currently connected to any experiments

  • NotImplementedError – If experiment connector does not implement this method.

Returns:

Mapping of model names to artifacts

Return type:

Dict[str, Artifact]

abstract property tags: List[str]#

Returns tags associated with experiment

Raises:

NotImplementedError – If experiment connector does not implement this method.

Returns:

List of tags associated with experiment

Return type:

List