I have created a local streamlit app to train tensorflow-based deep learning model. When the function model.fit(…) is being executed, it echos that Epoch 1/… and then hangs.
I have executed the code without streamlit. It is working well.It just hangs in streamlit mode execution. It does not throw any error.
Suggestion 1: caching the expensive calls might help
Suggestion 2: solve the dependencies conflicts without downgrading, but instead upgrading.
Pass an updated tensorflow version in the requirements.txt file (specify which version).
Suggestion 3: If that didn’t work, pass it as a GitHub repo in the requirements.txt with prefixing the repo link with git+ (see this)
I found after installing pyarrow==16.1.0 which is required by streamlit, tensorflow will stuck at epoch 1 if the model includes a convolutional layer and whether it’s running in streamlit or not. after downgrading pyarrow to 15.0.0 the problem solved.
Hope this could help!
I had the same problem : the fit() was in a librairy imported in the streamlit file.
Once I have dropped the tensorflow code directly in the streamllit file : it works!
I have no satisfying explaination …
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.