Weird login error with wandb?

Error

---- Running your python main ----
wandb=<module 'wandb' from '/home/miranda9/miniconda3/envs/meta_learning_a100/lib/python3.9/site-packages/wandb/__init__.py'>
wandb: W&B API key is configured. Use `wandb login --relogin` to force relogin
wandb: Network error (ReadTimeout), entering retry loop.
wandb: Network error (ReadTimeout), entering retry loop.
Problem at: /home/miranda9/ultimate-utils/ultimate-utils-proj-src/uutils/logging_uu/wandb_logging/common.py 25 setup_wand
wandb: ERROR Error communicating with wandb process
wandb: ERROR try: wandb.init(settings=wandb.Settings(start_method='fork'))
wandb: ERROR or:  wandb.init(settings=wandb.Settings(start_method='thread'))
wandb: ERROR For more info see: https://docs.wandb.ai/library/init#init-start-error
Traceback (most recent call last):
  File "/home/miranda9/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py", line 323, in <module>
    main()
  File "/home/miranda9/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py", line 254, in main
    args: Namespace = load_args()
  File "/home/miranda9/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py", line 247, in load_args
    setup_wand(args)
  File "/home/miranda9/ultimate-utils/ultimate-utils-proj-src/uutils/logging_uu/wandb_logging/common.py", line 25, in setup_wand
    wandb.init(project=args.wandb_project,
  File "/home/miranda9/miniconda3/envs/meta_learning_a100/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 999, in init
    run = wi.init()
  File "/home/miranda9/miniconda3/envs/meta_learning_a100/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 653, in init
    raise UsageError(error_message)
wandb.errors.UsageError: Error communicating with wandb process
try: wandb.init(settings=wandb.Settings(start_method='fork'))
or:  wandb.init(settings=wandb.Settings(start_method='thread'))
For more info see: https://docs.wandb.ai/library/init#init-start-error

Why is this happening and what is the solution?

Hey @brando,

I’m sorry to hear you are facing this. This error usually occurs due to multiprocessing and issues with the OS. I’m curious if you have tried the 2 suggestions in the error message:

wandb.init(settings=wandb.Settings(start_method='fork'))
wandb.init(settings=wandb.Settings(start_method='thread'))

and if either of them worked for you. Additionally, could you share what operating system you are running your code on?

Thanks,
Ramit

Hi Brando,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Weights & Biases