How to export a Deep Learning model trained with Keras in DSS?

Solved!
Benoni
Level 3
How to export a Deep Learning model trained with Keras in DSS?
Hi,

I have spent many weeks collecting, sampling and preprocessing data. I have finally trained a model that suits my purpose however i was rudely awakened by my inability to export the model outside DSS. Are models trained in DSS not exportable? I can find the keras_model.h5 file however no model.json. Is there anyway i can edit keras_model_training_info.json to fit my purposes?



..or is our custom models captive in DSS?
0 Kudos
1 Solution
Mattsco
Dataiker

Hi Benoni, 



Deploying a model in production can be very tricky so we developed a lot of features to help to deploy:

- In real-time, with API deployer you can deploy this model on a static API or on a Kubernetes cluster.

- In batch, with Automation node where the model can be scheduled to score new records every day. 

In both modes, we have features to monitor the models, follow the metrics, update it and manage the versions. 



It's also possible to export the model in several formats, if you want to do something else.

You can check this page of the doc: 

https://doc.dataiku.com/dss/latest/machine-learning/models-export.html



Matt

Mattsco

View solution in original post

0 Kudos
5 Replies
Mattsco
Dataiker

Hi Benoni, 



Deploying a model in production can be very tricky so we developed a lot of features to help to deploy:

- In real-time, with API deployer you can deploy this model on a static API or on a Kubernetes cluster.

- In batch, with Automation node where the model can be scheduled to score new records every day. 

In both modes, we have features to monitor the models, follow the metrics, update it and manage the versions. 



It's also possible to export the model in several formats, if you want to do something else.

You can check this page of the doc: 

https://doc.dataiku.com/dss/latest/machine-learning/models-export.html



Matt

Mattsco
0 Kudos
Benoni
Level 3
Author
Thanks Matt, you da best
0 Kudos
jax79sg
Level 2

Hi,



Isn't the following possible?




from keras.models import load_model
model.save('my_model.h5') # creates a HDF5 file 'my_model.h5'


 

0 Kudos
Mattsco
Dataiker
Hi,
You can do this if the model was trained in a python recipe and stored in a folder.
Mattsco
0 Kudos
pratikgujral-sf
Level 2

This may work only if your execution environment is local. If you have a containerized execution, the only way I know is to use the Dataiku API to save the models to a managed folder.

0 Kudos