I am trying to follow this guide 3 steps to fix app memory leaks to identify a memory leak. The code includes st.experimental_singleton
, but I get AttributeError: module 'streamlit' has no attribute 'experimental_singleton'
. There is no trace of st.experimental_singleton
in the documentation. It is not said that it was deprecated if it is, and there is no explanation about how to replace it with current streamlit code. Could some streamlit expert say how to reuse the code in that post with the current version of streamlit?
st.experimental_singleton
is now st.cache_resource
. Link to forum post about the change.