Closed tomgallagher closed 2 years ago
Thanks for bringing this to our attention. I'm not sure what's going on yet either. We'll take a look as soon as we can.
cc @rrpelgrim
import coiled
import dask
import asyncio
from dask.distributed import Client
import streamlit as st
def get_cloud_client():
dask.config.set({"coiled.token": st.secrets['coiled_token']})
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
cluster = coiled.Cluster(
n_workers=10,
name='coiled-streamlit',
software="datafile-comparison-v1"
)
client = Client(cluster)
return client
So this fixes the bug, looks like it's the latest version of Streamlit, which includes pages, is not launching event loop in page threads.
The coiled client should be managing the event loop itself, though. That's not something you'd normally need to touch.
@hayesgb FYI
@tomgallagher -- following up here. Can you comment on the status of this issue?
Should be fixed by latest release of Coiled. Please reopen if this issue is not resolved.
Using following package versions:
I'm getting this error
This bug occurs in very standard streamlit / coiled code
I'm not sure why I seem to have the problem. Any help hugely appreciated.