Skip to content

get_flow crashes when downloading a flow from a different sklearn version #569

@janvanrijn

Description

@janvanrijn

example code (run with sklearn 0.20 installed):

openml.flows.get_flow(6969)

When deciding whether to deserialize the model, it checks the dependencies according to a different schedule than when it actually deserialized the model. In the prior case, it just checks whether the correct library is available. In the latter case, it also checks the version number.

personally, I we should fix this before releasing a next version, as it will affect many users.

traceback:

/home/janvanrijn/anaconda3/envs/openml-python-contrib/bin/python /home/janvanrijn/projects/openml-python-contrib/testjan.py
Traceback (most recent call last):
  File "/home/janvanrijn/projects/openml-python-contrib/testjan.py", line 3, in <module>
    openml.flows.get_flow(6969)
  File "/home/janvanrijn/projects/openml-python/openml/flows/functions.py", line 23, in get_flow
    flow = OpenMLFlow._from_dict(flow_dict)
  File "/home/janvanrijn/projects/openml-python/openml/flows/flow.py", line 321, in _from_dict
    model = flow_to_sklearn(flow)
  File "/home/janvanrijn/projects/openml-python/openml/flows/sklearn_converter.py", line 173, in flow_to_sklearn
    rval = _deserialize_model(o, initialize_with_defaults)
  File "/home/janvanrijn/projects/openml-python/openml/flows/sklearn_converter.py", line 442, in _deserialize_model
    _check_dependencies(flow.dependencies)
  File "/home/janvanrijn/projects/openml-python/openml/flows/sklearn_converter.py", line 516, in _check_dependencies
    '%s not satisfied.' % dependency_string)
ValueError: Trying to deserialize a model with dependency sklearn==0.20.0 not satisfied.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions