Join us at the Everyday AI Conference in London, New York & Bengaluru! REGISTER NOW

Reading compressed pickled files from managed folder using joblib

pkansal
Level 3
Reading compressed pickled files from managed folder using joblib

I have saved compressed pickle files in a managed folder. Normally, I read it as follows:

with open(pickle_file,'''rb') as f:

     load(f)

 

How do I read it from a managed folder?

 

0 Kudos
2 Replies
SarinaS
Dataiker
Dataiker

Hi @pkansal,

You can read objects from managed folders, including pickle files like so: 

import dataiku
folder = dataiku.Folder("folder_name")
with folder.get_download_stream(pickle_file) as f:
  model = f.read()

 

Let us know if you have any questions about this. 

Thank you,
Sarina

0 Kudos
pkansal
Level 3
Author

The file is compressed with LZMA. How do I specify that compression here?

0 Kudos