Wallaroo SDK Upload Tutorial: Keras Sequential Single IO
How to upload a Keras Sequential Single IO model to Wallaroo via the Wallaroo SDK
Parameter | Description |
---|---|
Web Site | https://www.tensorflow.org/api_docs/python/tf/keras/Model |
Supported Libraries |
|
Framework | Framework.KERAS aka keras |
Supported File Types | SavedModel format as .zip file and HDF5 format |
During the model upload process, Wallaroo optimizes models by converting them to the Wallaroo Native Runtime, if possible, or running the model directly in the Wallaroo Containerized Runtime. See the Model Deploy for details on how to configure pipeline resources based on the model’s runtime.
TensorFlow Keras SavedModel models are .zip file of the SavedModel format. For example, the Aloha sample TensorFlow model is stored in the directory alohacnnlstm
:
├── saved_model.pb
└── variables
├── variables.data-00000-of-00002
├── variables.data-00001-of-00002
└── variables.index
This is compressed into the .zip file alohacnnlstm.zip
with the following command:
zip -r alohacnnlstm.zip alohacnnlstm/
See the SavedModel guide for full details.
Wallaroo supports the H5 for Tensorflow Keras models.
For Jupyter Notebooks running the Wallaroo JupyterHub Service that import the tensorflow library, for example:
import tensorflow
Import the tensorflow-cpu
library by executing the following command in the terminal shell:
pip install tensorflow-cpu==2.13.1 --user
Then proceed with the running the Notebook. This only applies to running notebooks in Wallaroo’s JupyterHub service, and does not affect model upload, packaging or other Wallaroo functionality. This does not affect using the Wallaroo SDK outside of Wallaroo’s JupyterHub service.
How to upload a Keras Sequential Single IO model to Wallaroo via the Wallaroo SDK