Reputation: 11
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.
Upvotes: 1
Views: 1356
Reputation: 1683
I tried to reproduce the issue and worked for me. The warning is regarding the deserialization and the dependency is notified in conda environment. To avoid the warning and achieve the prediction and get the result. It is suggested to use the AutoML notebook.
# 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)
Before getting the details of the best model output, we need to get success to the below code block
metrics_output = pipeline_run.get_pipeline_output(metrics_output_name)
num_file_downloaded = metrics_output.download('.', show_progress=True)
the metrics data must be downloaded perfectly.
Output:
Upvotes: 0