Later in a different function we read this from Blob storage as follows -
blob = BlobClient(account_url='https://fhghjhjh’,
container_name=‘YYY’,
blob_name='feg_pipeline.pkl’,
credential=‘XXX’)
feg_from_blob = None
with open("feg_pipeline.pkl”, "wb") as f:
data = blob.download_blob()
data.readinto(f)
with open("feg_pipeline.pkl”, "rb") as f:
feg_from_blob = dill.load(f)
For this we are getting
UnpicklingError: invalid load key, 'f'.
We have tried using -
Dill, Joblib, cPickle, CloudPickle and Pickle methods for serializing and deserializing, all of these gave keyerror while loading the object from the file downloaded from Blob.
Base64 encoding(while serializing) and decoding(while deserializing)..This gives a padding error while loading.
What is the best way to persist and reuse such objects in Azure?
We serialize the 'pipeline' object and store it on Azure Blob Storage.
Later in a different function we read this from Blob storage as follows -
For this we are getting
We have tried using -
What is the best way to persist and reuse such objects in Azure?