Source code for

from mlflow.entities._mlflow_object import _MLflowObject
from mlflow.entities.run_data import RunData
from mlflow.entities.run_info import RunInfo
from mlflow.exceptions import MlflowException
from mlflow.protos.service_pb2 import Run as ProtoRun

[docs]class Run(_MLflowObject): """ Run object. """ def __init__(self, run_info, run_data): if run_info is None: raise MlflowException("run_info cannot be None") self._info = run_info self._data = run_data @property def info(self): """ The run metadata, such as the run id, start time, and status. :rtype: :py:class:`mlflow.entities.RunInfo` """ return self._info @property def data(self): """ The run data, including metrics, parameters, and tags. :rtype: :py:class:`mlflow.entities.RunData` """ return self._data
[docs] def to_proto(self): run = ProtoRun() if return run
[docs] @classmethod def from_proto(cls, proto): return cls(RunInfo.from_proto(, RunData.from_proto(
[docs] def to_dictionary(self): run_dict = { "info": dict(, } if run_dict["data"] = return run_dict