Skip to content

Mlflow version check not working #167

Description

@dwahdany

The BaseIterator checks the mlflow version with mlflow.__version__ < "2.2.1" (see code below). This check does not function as intented, since for the latest version (2.10.0) the check is true, as the string comparison "2.10.0" < "2.2.1" passes.

class BaseIterator():
    """
    Base class to iterate for 'search' methods that return PageList.
    """
    def __init__(self, search_method, max_results=None, filter=None):
        self.search_method = search_method
        self.filter = filter
        self.max_results = max_results
        self.idx = 0
        self.paged_list = None
        self.kwargs = { "max_results": self.max_results } if self.max_results else {}

    def _call_iter(self):
        if mlflow.__version__ < "2.2.1":
            return self.search_method(filter_string=self.filter)  #7623 - https://mlflow.org/docs/2.1.1/python_api/mlflow.client.html
        else:
            return self.search_method(filter_string=self.filter, **self.kwargs) # https://mlflow.org/docs/latest/python_api/mlflow.client.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions