tensorflow / models

Models and examples built with TensorFlow
Other
76.79k stars 45.84k forks source link

Python Streamlit Deployment: variables.data-00000-of-00001 file; "tensorflow.python.framework.errors_impl.OpError: not an sstable (bad magic number)" Error #10630

Closed pinzhi000 closed 2 years ago

pinzhi000 commented 2 years ago

I am trying to deploy a streamlit app that uses a tensorflow model. The webapp is working properly on my local host but when I try to deploy it on Streamlit cloud I get the following errror: tensorflow.python.framework.errors_impl.OpError: not an sstable (bad magic number)

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 443, in _run_script

    exec(code, module.__dict__)

  File "/app/resp_db/rsd_app.py", line 159, in <module>

    model = tensorflow.keras.models.load_model('./saved_model')

  File "/home/appuser/venv/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler

    raise e.with_traceback(filtered_tb) from None

  File "/home/appuser/venv/lib/python3.9/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 45, in error_translator

    raise errors_impl.OpError(None, None, error_message, errors_impl.UNKNOWN)

tensorflow.python.framework.errors_impl.OpError: not an sstable (bad magic number)

And on my app itself I see this error message: image

You can see my github repo here: https://github.com/pinzhi000/resp_db

pindinagesh commented 2 years ago

Hi @pinzhi000

Can you please take a look at the workaround proposed for a similar issue. Hope this helps. Thanks!

google-ml-butler[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 2 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No