This message was deleted.
# ask-for-help
s
This message was deleted.
🏁 1
k
The full stack trace:
2023-03-07 114641.677863: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNINGabslFound untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op while saving (showing 2 of 2). These functions will not be directly callable after loading. Traceback (most recent call last): File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\fs\osfs.py", line 654, in open **options PermissionError: [Errno 13] Permission denied: b'C:\\Users\\grig\\bentoml\\models\\scratch_classifier\\latest' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bento.py", line 8, in <module> bentoml.keras.save_model("scratch_classifier:latest", cnn_classifier) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\bentoml\_internal\frameworks\keras.py", line 287, in save_model return bento_model File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\contextlib.py", line 119, in exit next(self.gen) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\bentoml\models.py", line 268, in create res.save(_model_store) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\simple_di\__init__.py", line 139, in _ return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs)) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\bentoml\_internal\models\model.py", line 220, in save self.__fs = out_fs File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\contextlib.py", line 119, in exit next(self.gen) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\bentoml\_internal\store.py", line 176, in register or self.get(_tag).creation_time >= self.get(_tag.name).creation_time File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\bentoml\_internal\store.py", line 132, in get _tag.version = self._fs.readtext(_tag.latest_path()) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\fs\base.py", line 694, in readtext path, mode="rt", encoding=encoding, errors=errors, newline=newline File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\fs\osfs.py", line 654, in open **options File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\fs\error_tools.py", line 89, in exit reraise(fserror, fserror(self._path, exc=exc_value), traceback) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\six.py", line 718, in reraise raise value.with_traceback(tb) File "C:\Users\grig\Anaconda3\envs\bentoml_env\lib\site-packages\fs\osfs.py", line 654, in open **options fs.errors.FileExpected: path 'scratch_classifier/latest' should be a file
l
Have you used an old version of BentoML before? Could you try deleting the latest/ folder and save the model again?
k
No, I'm totally new to BentoML, creating my first project. When deleting only the latest folder, I'm getting the following error: bentoml.exceptions.BentoMLException: Item 'scratch_classifier:latest' already exists in the store <osfs 'C:\Users\grig\bentoml\models'>
l
ok, I think you should try:
bentoml.keras.save_model("scratch_classifier", cnn_classifier)
👍 1
k
That works. Thanks