Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

Export model from dataiku jupyter to my local machine

omar21
Level 1
Export model from dataiku jupyter to my local machine

Hi ,

 

I built a customize model on dataiku jupyter notebook (we can say from scratch) , (i didn't use the the model proposed by dataiku) and i want to save and export it on my local machine out of dataiku because i want to deploy it on another software not linked with dataiku 

How can i do it?

 

0 Kudos
1 Reply
louisplt
Dataiker
Dataiker

Hello @omar21,

It's not very clear for me what you want to achieve.

If you want to export only the model you could try to dump its python object into a file (using pickle) and then put this file in a Folder managed by DSS. For this you need first to create a Folder (on the top right of the Flow > +Dataset > Folder) and execute the following code in your notebook: 

import dataiku
import pickle

model_file_name = THE_MODEL_FILENAME

folder = dataiku.api_client().get_project(YOUR_PROJECT_KEY).get_managed_folder(MANAGED_FOLDER_ID)
with open(model_file_name, 'w+') as f:
    pickle.dump(model_object, f) 
    folder.put_file(model_file_name, f)

Afterwards, you should see the new file in the Managed Folder and be able to download it.

Hope this helps

0 Kudos