You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Versions installed on Windows 11 desktop:
bentoml 1.2.9
keras 3.1.1
tensorflow 2.16.1
The Issue:
After training a Keras model of CNN with the MNIST dataset, need to save the trained Keras model
to the Bentoml model store, but always got the ValueError complaining about the arguments of ['signatures', 'options']
not supported, though those were never passed as arguments in the save_model() call.
See the python codes below:
def main():
import bentoml
import tensorflow as tf
from tensorflow import keras
"""Trains a model for classifying digits using the MNIST dataset."""
train_images, train_labels, test_images, test_labels = prepare_mnist_training_data()
model = build_convnet_model(INPUT_SHAPE, NUM_CLASSES)
model = train_model(
model, train_images, train_labels, test_images, test_labels, NUM_EPOCHS
)
# save the model to bento model store
# model.save("cnn_model.keras")
bentoml.keras.save_model("keras_cnn", model)
if name == "main":
main()
And the error messages when running above codes:
Traceback (most recent call last):
File "C:\Users\rxiao\Tensorflow-Tutorial\mldeployment\mldeployment\training.py", line 138, in
main()
File "C:\Users\rxiao\Tensorflow-Tutorial\mldeployment\mldeployment\training.py", line 134, in main
bentoml.keras.save_model("keras_cnn", model)
File "C:\Users\rxiao\anaconda3\envs\tf\Lib\site-packages\bentoml_internal\frameworks\keras.py", line 267, in save_model
model.save(
File "C:\Users\rxiao\AppData\Roaming\Python\Python311\site-packages\keras\src\utils\traceback_utils.py", line 123, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\rxiao\AppData\Roaming\Python\Python311\site-packages\keras\src\models\model.py", line 309, in save
raise ValueError(
ValueError: The following argument(s) are not supported: ['signatures', 'options']
Is there a bug in the bentoml._internal.frameworks.keras library?
Or What else do I miss here?
Thanks in advance for your help!!
The text was updated successfully, but these errors were encountered:
Versions installed on Windows 11 desktop:
bentoml 1.2.9
keras 3.1.1
tensorflow 2.16.1
The Issue:
After training a Keras model of CNN with the MNIST dataset, need to save the trained Keras model
to the Bentoml model store, but always got the ValueError complaining about the arguments of ['signatures', 'options']
not supported, though those were never passed as arguments in the save_model() call.
See the python codes below:
def main():
if name == "main":
main()
And the error messages when running above codes:
Traceback (most recent call last):
File "C:\Users\rxiao\Tensorflow-Tutorial\mldeployment\mldeployment\training.py", line 138, in
main()
File "C:\Users\rxiao\Tensorflow-Tutorial\mldeployment\mldeployment\training.py", line 134, in main
bentoml.keras.save_model("keras_cnn", model)
File "C:\Users\rxiao\anaconda3\envs\tf\Lib\site-packages\bentoml_internal\frameworks\keras.py", line 267, in save_model
model.save(
File "C:\Users\rxiao\AppData\Roaming\Python\Python311\site-packages\keras\src\utils\traceback_utils.py", line 123, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\rxiao\AppData\Roaming\Python\Python311\site-packages\keras\src\models\model.py", line 309, in save
raise ValueError(
ValueError: The following argument(s) are not supported: ['signatures', 'options']
Is there a bug in the bentoml._internal.frameworks.keras library?
Or What else do I miss here?
Thanks in advance for your help!!
The text was updated successfully, but these errors were encountered: