You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name of the Streamlit feature whose docs need improvement:
Core concepts, runtime behavior, session state
What you think the docs should say:
Currently the docs say (emphasis mine):
If possible, move class definitions into their own module file and import them into your app script. As long as you are not editing the file where your class is defined, Streamlit will not re-import it with each rerun.
Streamlit only reloads code in imported modules when it detects the code has changed. Thus, if you are actively editing the file where your class is defined, you may need to stop and restart your Streamlit server to avoid an undesirable class redefinition mid-session.
The behavior, at least in 1.38, is that when any code (not just the module file) is changed, the module will be re-imported. So either this is unexpected behavior, in which case let me know and I can file a bug report, or the docs could be improved to say something like:
If possible, move class definitions into their own module file and import them into your app script. As long as you are not editing the file where your class is defined, or the Streamlit app script file, Streamlit will not re-import it with each rerun.
Streamlit only reloads code in imported modules when it detects the**any** code, either the module file or the app script file, has changed. Thus, if you are actively editing the file where your class is defined, you may need to stop and restart your Streamlit server to avoid an undesirable class redefinition mid-session.
The text was updated successfully, but these errors were encountered:
Link to doc page in question (if any):
https://docs.streamlit.io/develop/concepts/design/custom-classes#pattern-1-define-your-class-in-a-separate-module
Name of the Streamlit feature whose docs need improvement:
Core concepts, runtime behavior, session state
What you think the docs should say:
Currently the docs say (emphasis mine):
The behavior, at least in 1.38, is that when any code (not just the module file) is changed, the module will be re-imported. So either this is unexpected behavior, in which case let me know and I can file a bug report, or the docs could be improved to say something like:
The text was updated successfully, but these errors were encountered: