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

RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock. self.pid = os.fork() #1125

Open
melikaaala opened this issue Apr 16, 2024 · 4 comments

Comments

@melikaaala
Copy link

Hi
I have trained machine learning python code on google colab but I faced this error. Is there any solution for this:
os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock. self.pid = os.fork()

@melikaaala melikaaala changed the title fork deadlock RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock. self.pid = os.fork() Apr 16, 2024
@Delgan
Copy link
Owner

Delgan commented Apr 16, 2024

Can you please share the code that produces this warning?

Loguru does not call os.fork().

@melikaaala
Copy link
Author

I use this url: https://github.com/Algolzw/image-restoration-sde

@melikaaala
Copy link
Author

melikaaala commented Apr 17, 2024 via email

@Delgan
Copy link
Owner

Delgan commented Apr 17, 2024

Sorry but there is not enough information for me to help you. Please, try to provide a minimal reproducible example involving usage of Loguru.

Right now, I don't understand how the problem you're facing is related to Loguru. As I said, your error is complaining about usage of os.fork() within JAX framework, but Loguru does not make any use of forking.

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