mlflow.entities

The mlflow.entities module defines entities returned by the MLflow REST API.

class mlflow.entities.Experiment(experiment_id, name, artifact_location, lifecycle_stage)

Bases: mlflow.entities._mlflow_object._MLflowObject

Experiment object.

ACTIVE_LIFECYCLE = 'active'
DEFAULT_EXPERIMENT_ID = 0
DELETED_LIFECYCLE = 'deleted'
artifact_location

String corresponding to the root artifact URI for the experiment.

experiment_id

Integer ID of the experiment.

classmethod from_proto(proto)
lifecycle_stage

Lifecycle stage of the experiment. Can either be ‘active’ or ‘deleted’.

name

String name of the experiment.

to_proto()
class mlflow.entities.FileInfo(path, is_dir, file_size)

Bases: mlflow.entities._mlflow_object._MLflowObject

Metadata about a file or directory.

file_size

Size of the file or directory. If the FileInfo is a directory, returns None.

classmethod from_proto(proto)
is_dir

Whether the FileInfo corresponds to a directory.

path

String path of the file or directory.

to_proto()
class mlflow.entities.Metric(key, value, timestamp)

Bases: mlflow.entities._mlflow_object._MLflowObject

Metric object.

classmethod from_proto(proto)
key

String key corresponding to the metric name.

timestamp

Metric timestamp as an integer (milliseconds since the Unix epoch).

to_proto()
value

Float value of the metric.

class mlflow.entities.Param(key, value)

Bases: mlflow.entities._mlflow_object._MLflowObject

Parameter object.

classmethod from_proto(proto)
key

String key corresponding to the parameter name.

to_proto()
value

String value of the parameter.

class mlflow.entities.Run(run_info, run_data)

Bases: mlflow.entities._mlflow_object._MLflowObject

Run object.

data

The run data, including metrics, parameters, and tags.

Return type:mlflow.entities.RunData
classmethod from_dictionary(the_dict)
classmethod from_proto(proto)
info

The run metadata, such as the run id, start time, and status.

Return type:mlflow.entities.RunInfo
to_dictionary()
to_proto()
class mlflow.entities.RunData(metrics=None, params=None, tags=None)

Bases: mlflow.entities._mlflow_object._MLflowObject

Run data (metrics and parameters).

classmethod from_dictionary(the_dict)
classmethod from_proto(proto)
metrics

List of mlflow.entities.Metric for the current run.

params

List of mlflow.entities.Param for the current run.

tags

List of mlflow.entities.RunTag for the current run.

to_proto()
class mlflow.entities.RunInfo(run_uuid, experiment_id, name, source_type, source_name, entry_point_name, user_id, status, start_time, end_time, source_version, lifecycle_stage, artifact_uri=None)

Bases: mlflow.entities._mlflow_object._MLflowObject

Metadata about a run.

ACTIVE_LIFECYCLE = 'active'
DELETED_LIFECYCLE = 'deleted'
artifact_uri

String root artifact URI of the run.

end_time

End time of the run, in number of milliseconds since the UNIX epoch.

entry_point_name

String name of the entry point for the run.

experiment_id

Integer ID of the experiment for the current run.

classmethod from_proto(proto)
lifecycle_stage
name

String name of the run.

run_uuid

String containing run UUID.

source_name

String name of the source of the run (GitHub URI of the project corresponding to the run, etc).

source_type

mlflow.entities.SourceType describing the source of the run.

source_version

String Git commit hash of the code used for the run, if available.

start_time

Start time of the run, in number of milliseconds since the UNIX epoch.

status

One of the values in mlflow.entities.RunStatus describing the status of the run.

to_proto()
user_id

String ID of the user who initiated this run.

class mlflow.entities.RunStatus

Bases: object

Enum for status of an mlflow.entities.Run.

FAILED = 4
FINISHED = 3
RUNNING = 1
SCHEDULED = 2
static from_string(status_str)
static is_terminated(status)
static to_string(status)
class mlflow.entities.RunTag(key, value)

Bases: mlflow.entities._mlflow_object._MLflowObject

Tag object associated with a run.

classmethod from_proto(proto)
key

String name of the tag.

to_proto()
value

String value of the tag.

class mlflow.entities.SourceType

Bases: object

Enum for originating source of a mlflow.entities.Run.

JOB = 2
LOCAL = 4
NOTEBOOK = 1
PROJECT = 3
UNKNOWN = 5
class mlflow.entities.ViewType

Bases: object

Enum to filter requested experiment types.

ACTIVE_ONLY = 1
ALL = 3
DELETED_ONLY = 2
classmethod from_proto(proto_view_type)
classmethod from_string(view_str)
classmethod to_proto(view_type)
classmethod to_string(view_type)