Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4.07k stars 2.52k forks source link

msrest.serialization:Ran into a deserialization error following AutoMLStep run #1841

Closed nabil-fcbqa closed 1 year ago

nabil-fcbqa commented 1 year ago

Hello,

I am running an automated ML training notebook which is basically replicating a MS tutorial notebook (https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/machine-learning-pipelines/intro-to-pipelines/aml-pipelines-with-automated-machine-learning-step.ipynb).

After running the pipeline to completion, I try to retrieve the model using the following code

# Retrieve best model from Pipeline Run
best_model_output = pipeline_run.get_pipeline_output(best_model_output_name)
num_file_downloaded = best_model_output.download('.', show_progress=True)

And get the following warning:

WARNING:msrest.serialization:Ran into a deserialization error. Ignoring since this is failsafe deserialization
Traceback (most recent call last):
  File "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/msrest/serialization.py", line 1509, in failsafe_deserialize
    return self(target_obj, data, content_type=content_type)
  File "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/msrest/serialization.py", line 1375, in __call__
    data = self._unpack_content(response_data, content_type)
  File "/anaconda/envs/azureml_py38/lib/python3.8/site-packages/msrest/serialization.py", line 1543, in _unpack_content
    raise ValueError("This pipeline didn't have the RawDeserializer policy; can't deserialize")
ValueError: This pipeline didn't have the RawDeserializer policy; can't deserialize

And subsequently running into an error when trying to load the model:

import pickle

with open(best_model_output._path_on_datastore, "rb" ) as f:
    best_model = pickle.load(f)
best_model

EOFError: Ran out of input

I am using the SDK version 1.46.0.

Some help will be appreciated , thank you.