Delgan / loguru

Python logging made (stupidly) simple
MIT License
18.65k stars 682 forks source link

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 2 months ago

melikaaala commented 2 months ago

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()

Delgan commented 2 months ago

Can you please share the code that produces this warning?

Loguru does not call os.fork().

melikaaala commented 2 months ago

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

melikaaala commented 2 months ago

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

On Tue, Apr 16, 2024 at 9:29 AM Delgan @.***> wrote:

Can you please share the code that produces this warning?

Loguru does not call os.fork().

— Reply to this email directly, view it on GitHub https://github.com/Delgan/loguru/issues/1125#issuecomment-2058288286, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALIF3BCCZTOHLUSXTG3NVR3Y5S43HAVCNFSM6AAAAABGISM4LSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGI4DQMRYGY . You are receiving this because you authored the thread.Message ID: @.***>

Delgan commented 2 months ago

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.