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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.