A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mlflow.org/docs/latest/python_api/../_modules/mlflow/entities/run_outputs.html below:

mlflow.entities.run_outputs

Source code for mlflow.entities.run_outputs
from typing import Any

from mlflow.entities._mlflow_object import _MlflowObject
from mlflow.entities.logged_model_output import LoggedModelOutput
from mlflow.protos.service_pb2 import RunOutputs as ProtoRunOutputs


[docs]class RunOutputs(_MlflowObject):
    """RunOutputs object."""

    def __init__(self, model_outputs: list[LoggedModelOutput]) -> None:
        self._model_outputs = model_outputs

    def __eq__(self, other: _MlflowObject) -> bool:
        if type(other) is type(self):
            return self.__dict__ == other.__dict__
        return False

    @property
    def model_outputs(self) -> list[LoggedModelOutput]:
        """Array of model outputs."""
        return self._model_outputs

[docs]    def to_proto(self):
        run_outputs = ProtoRunOutputs()
        run_outputs.model_outputs.extend(
            [model_output.to_proto() for model_output in self.model_outputs]
        )

        return run_outputs

[docs]    def to_dictionary(self) -> dict[Any, Any]:
        return {
            "model_outputs": self.model_outputs,
        }

[docs]    @classmethod
    def from_proto(cls, proto):
        model_outputs = [
            LoggedModelOutput.from_proto(model_output) for model_output in proto.model_outputs
        ]

        return cls(model_outputs)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4