Search code examples
pythonazure-machine-learning-service

How can I match my local azure automl python sdk version to the remote version?


I'm using the azure automl python sdk to download and save a model then reload it. I get the following error:

anaconda3\envs\automl_21\lib\site-packages\sklearn\base.py:318: UserWarning: Trying to unpickle estimator Pipeline from version 0.22.1 when using version 0.22.2.post1. This might lead to breaking code or invalid results. Use at your own risk.
  UserWarning)

How can I ensure that the versions match?


Solution

  • My Microsoft contact says -

    "For this, their best bet is probably to see what the training env was pinned to and install those same pins. They can get that env by running child_run.get_environment() and then pip install all the pkgs listed in there with the pins listed there."

    A useful code snippet.

    for run in experiment.get_runs():
        tags_dictionary = run.get_tags()
        best_run = AutoMLRun(experiment, tags_dictionary['automl_best_child_run_id'])
        env = best_run.get_environment()
        print(env.python.conda_dependencies.serialize_to_string())