Models created from Azure Machine Learning are giving error while loading

Piyush Athawale 0 Reputation points
2024-12-13T03:23:23.3133333+00:00

After creating model in Azure Machine Learning, I am unable to load it using the joblib library in my notebook. I get the following error:

TypeError: _unpickle_timestamp() takes exactly 3 positional arguments (4 given)

This happened 3 days ago. The older models which I had created (before last week) are loading perfectly fine. Any new model I create from Automated ML service are giving this error. I also get this warning:

if unpickler.compat_mode: 579 warnings.warn("The file '%s' has been generated with a " 580 "joblib version less than 0.10. " 581 "Please regenerate this pickle file." 582 % filename, 583 DeprecationWarning, stacklevel=3)

What is the workaround for this?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,333 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Gowtham CP 6,020 Reputation points Volunteer Moderator
    2024-12-13T07:12:00.7033333+00:00

    Hello Piyush Athawale ,

    Thank you for reaching out on the Microsoft Q&A.

    The issue you're facing is because the version of joblib used by Azure Machine Learning to save the model doesn’t match the version you’re using locally to load it. To fix this, check the joblib version in your environment and update or downgrade it to match the version Azure is using. You can do this with pip install joblib==<version>. If you want to avoid these compatibility issues altogether, try saving your model in ONNX format instead, which is more universal and doesn’t rely on joblib. Tools like onnxmltools can help with converting and saving the model. Lastly, make sure your Azure ML SDK is updated, as this issue might also be caused by recent changes in Azure's environment. Following these steps should get your models working again.

     I hope this helps! If you have any further questions, feel free to ask.

    If the information is useful, please accept the answer and upvote it to assist other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.