How to export a Deep Learning model trained with Keras in DSS?
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?
Best Answer
-
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
Answers
-
Thanks Matt, you da best
-
Hi,
Isn't the following possible?
from keras.models import load_model
model.save('my_model.h5') # creates a HDF5 file 'my_model.h5' -
Hi,
You can do this if the model was trained in a python recipe and stored in a folder. -
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.