Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: This event loop is already running. #234

Open
SingTeng opened this issue Mar 8, 2024 · 5 comments
Open

RuntimeError: This event loop is already running. #234

SingTeng opened this issue Mar 8, 2024 · 5 comments

Comments

@SingTeng
Copy link

SingTeng commented Mar 8, 2024

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
image
image

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
@ShilinHe
Copy link
Collaborator

ShilinHe commented Mar 8, 2024

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.

@SingTeng
Copy link
Author

@ShilinHe What would be your suggested compute platform on Azure?

@SingTeng
Copy link
Author

SingTeng commented Mar 26, 2024

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.
image

@ShilinHe
Copy link
Collaborator

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!

@SingTeng
Copy link
Author

  1. In Azure Machine Learning Studio, open up a terminal, you can do it directly in Notebooks or use the JupyterLab.
  2. In the the terminal, do a 'cd ~' which will take you back to home directory.
  3. Do a 'ls', you will now see 3 folders: cloudfiles localfiles readme
  4. Go into localfiles, and git clone / copy your TaskWeaver into the directory.
  5. Then set up as per normal instructions on TaskWeaver guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants