Skip to content

VersionMismatchError

yohou_mlflow.VersionMismatchError

Bases: YohouMlflowError

The installed packages differ from those the model was saved with.

Parameters

Name Type Description Default
mismatches sequence of VersionMismatch

One entry per package whose installed version breaks the comparison rule.

required

Attributes

Name Type Description
mismatches tuple of VersionMismatch

The mismatches, in the order they were found.

Source Code

Source code in src/yohou_mlflow/_exceptions.py
class VersionMismatchError(YohouMlflowError):
    """The installed packages differ from those the model was saved with.

    Parameters
    ----------
    mismatches : sequence of VersionMismatch
        One entry per package whose installed version breaks the comparison rule.

    Attributes
    ----------
    mismatches : tuple of VersionMismatch
        The mismatches, in the order they were found.
    """

    def __init__(self, mismatches: Sequence[VersionMismatch]) -> None:
        self.mismatches = tuple(mismatches)
        super().__init__(describe_mismatches(self.mismatches))