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 …