When the app is trying to load the weights of my trained model from my Github repo, app is throwing below error.
IndexError: Read less bytes than requested
Traceback:
** **File "/home/appuser/.local/lib/python3.7/site-packages/streamlit/script_runner.py", line 332, in _run_script** ** exec(code, module.__dict__)File "/app/road_damage_detection_streamlit/app.py", line 419, in <module>** ** main()File "/app/road_damage_detection_streamlit/app.py", line 57, in main** ** run_the_app()File "/app/road_damage_detection_streamlit/app.py", line 93, in run_the_app** ** yolo.load_weights(weights).expect_partial()File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 2205, in load_weights** ** status = self._trackable_saver.restore(filepath, options)File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py", line 1299, in restore** ** object_graph_string = reader.get_tensor(base.OBJECT_GRAPH_PROTO_KEY)File "/home/appuser/.local/lib/python3.7/site-packages/tensorflow/python/training/py_checkpoint_reader.py", line 70, in get_tensor** ** self, compat.as_bytes(tensor_str))** **
Note: I already deployed this streamlit app without any issues on GCP and it was also running fine as expected and also it is to be noted that I pushed the weights into my GITHUB Repo using GITHUB LFS because weights size is around 395 MB.
Hi @randyzwitch Greetings, do you have any update when GIT LFS will be available, as you have informed that this will be added by end of January/ early february.
If I’m not mistaken, Git LFS should go out in our next release (we do weekly releases on Streamlit sharing). So I’m pretty sure it’s coming out this week (West Coast of the U.S. still not in the office, so haven’t confirmed yet).
Not sure what everyone is expecting here…3 days ago (Monday), the expectation was “this week”. It’s still this week for two more business days, and the West Coast of the United States hasn’t even woken up, let alone arrived at work.
We try our best to give out accurate dates, but if it’s going to become a problem where the demands are ever increasing, then we’ll have to reconsider what information we share with the community. Please be patient.
Hi Guys,
If anyone still have this issue, IndexError: Read less bytes than requested… This is what worked for me,
My google drive disk ran out of memory and it was throwing me this error when I was trying to load model that I have previously saved in the google drive.
I used different google drive account with decent memory disk, to save and load model, and I had no issue.