I am using Jupyter Notebook to train some ML models and want to use the toast function to notify when the model finished training. However, when I tried to use it on Jupyter Notebook, I got an error stating "asyncio.run() cannot be called from a running event loop". This error makes sense because your toast function assumes there is no existing event loop, but there is, if I am using Jupyter Notebook / Lab.
I am using Jupyter Notebook to train some ML models and want to use the toast function to notify when the model finished training. However, when I tried to use it on Jupyter Notebook, I got an error stating "asyncio.run() cannot be called from a running event loop". This error makes sense because your toast function assumes there is no existing event loop, but there is, if I am using Jupyter Notebook / Lab.