TaskWeaver
TaskWeaver copied to clipboard
RuntimeError: This event loop is already running.
Describe the bug I don't know if this is related to platform or code. I try to run Taskweaver in Azure Machine Learning Studio. I get 'RuntimeError: This event loop is already running' when trying to run Taskweaver.
To Reproduce I clone the code on Azure Machine Learning Studio and run it using Jupyterlab terminal. Pip installed all the necessary packages. Then I do a 'chmod 600 TaskWeaver'. Then I start the taskweaver by doing: python -m taskweavr =p ./project/ The starting is fine. When I ask it to do something, it runs into the error.
Screenshots
Environment Information (please complete the following information):
- Azure Machine Learning Studio
- Python Version 3.10
- LLM that you're using: tried on both gpt35-16k and gpt-4
Hi @SingTeng, I also encountered the same issue in AML. The error message suggests that the kernel started by TaskWeaver runs inside another kernel (guess it is the Jupyter-lab terminal you mentioned). Not sure how AML manages the Jupyter kernels, so it would be better to move to another compute platform.
@ShilinHe What would be your suggested compute platform on Azure?
ok. I am here to provide a solution.
In Azure Machine Learning Studio, you can start a terminal to run Taskweaver.
The trick is to have the Taskweaver in localfiles, not cloudfiles.
Normally when we run things on AzureML, it is default to cloudfiles. But in this case you have to switch to localfiles.
Hi @SingTeng, so glad to see that you have resolved the issue! Could you also add a detailed instruction of how to configure it in AML in this issue thread? so that other people could learn and benefit from your experience. Thanks!
- In Azure Machine Learning Studio, open up a terminal, you can do it directly in Notebooks or use the JupyterLab.
- In the the terminal, do a 'cd ~' which will take you back to home directory.
- Do a 'ls', you will now see 3 folders: cloudfiles localfiles readme
- Go into localfiles, and git clone / copy your TaskWeaver into the directory.
- Then set up as per normal instructions on TaskWeaver guide.