Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mlflow version check not working #167

Open
dwahdany opened this issue Feb 1, 2024 · 0 comments · May be fixed by #168
Open

Mlflow version check not working #167

dwahdany opened this issue Feb 1, 2024 · 0 comments · May be fixed by #168

Comments

@dwahdany
Copy link

dwahdany commented Feb 1, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant