Version 1.12.0

Thanks for the information
but i dont understand why streamlit cloud dont use the last version of python
because the problem occurs on streamlit cloud too

i upgrade python to 3.9.12 and this not solve the problem
i go back to streamlit 1.11 and the problem disapear :disappointed_relieved:

You can’t change the python version for your application in Streamlit Cloud. You need to delete the application and create it again. When creating the application you can choose between several python versions.

@jrieke do you have example snippet of what is meant by " unctions cached with st.experimental_memo or st.experimental_singleton can now contain static st commands. This allows caching text, charts, dataframes, and more!" couldnt see any in docs if were there

1 Like

Hi @ksdaftari :wave:, you can now find examples of replaying static st commands in the docs for memo and singleton.

3 Likes

@snehankekre awesome thanks! took look at that clears things up very nicely. awesome functionality!

I would like to get a better understanding of the st.experimental_memo upgrade. I decorate a lot of functions with this; some returning dataframes, some returning charts.

For example, I have a function like this:

@st.experimental_memo
def retrieve_dataframe():
    return (dataframe file from AWS S3)

It accepts no arguments, retrieves the file once upon application load, and I assume this is the optimal way I can load / run this functionality. (1) Is that correct?

I have other functions using exp_memo like this:

@st.experimental_memo
def parse_info(df: pd.DataFrame) -> str:
    return ",".join(df.index.values)

Assuming the dataframe being passed to parse_info doesn’t change, (2) is the result of this function also cached?

I guess I’m unclear as to how v1.12 has improved the experimental_memo functionality. Can someone provide an explicit example and clarify how “this allows caching text, charts, dataframes, and more!”?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.