Experiment API

pydantic model mlopus.mlflow.ExpApi[source]

Bases: Experiment, EntityApi

Experiment metadata with MLflow API handle.

field id: str [Required]

Experiment ID in the pattern [w-]+

field name: str [Required]

Experiment Name.

field tags: Dict[str, Any] [Required]

Nested tags dict with JSON-serializable leaf-values and keys in the pattern: [w-/]+

class Config

Bases: object

Pydantic class config.

cache_meta()[source]

Fetch latest metadata for this experiment and save it to cache.

Return type:

ExpApi

create_run(name=None, tags=None, repo=None, parent=None)[source]

Declare a new run in this experiment to be used later.

Parameters:
Return type:

RunApi

export_meta(target)[source]

Export experiment metadata cache to target.

Parameters:

target (Path) – Cache export path.

Return type:

ExpApi

find_runs(query=None, sorting=None)[source]

Search runs belonging to this experiment with query in MongoDB query language.

Parameters:
  • query (Optional[Dict[str, Any]]) – Query in MongoDB query language.

  • sorting (Optional[List[Tuple[str, Literal[1, -1]]]]) – Sorting criteria (e.g.: [(“asc_field”, 1), (“desc_field”, -1)]).

Return type:

Iterator[RunApi]

set_tags(tags)[source]

Set tags on this experiment.

Parameters:

tags (Mapping) – See schema.Experiment.tags.

Return type:

ExpApi

start_run(name=None, tags=None, repo=None, parent=None)[source]

Start a new run in this experiment.

Parameters:
Return type:

RunApi

update()

Use API to get latest data for this entity and update this entity in place.

Return type:

EntityApi

property url: str

This experiment’s URL.