esl-epfl / TEE4EHR

3 stars 1 forks source link

W&B init error #4

Closed mshavliuk closed 1 month ago

mshavliuk commented 2 months ago

The command I run:

python Main.py  -data ./data/p19/ -setting raindrop -split 0 -demo -data_label multilabel -wandb -wandb_project TEEDAM_supervised -event_enc 1 -state -mod ml -next_mark 1 -mark_detach 1 -sample_label 1 -user_prefix [H70--TEDA__pp_ml-concat] -time_enc concat -wandb_tag RD75

The error I get:

wandb: ERROR Error while calling W&B API: project not found (<Response [404]>)
wandb: ERROR It appears that you do not have permission to access the requested resource. Please reach out to the project owner to grant you access. If you have the correct permissions, verify that there are no issues with your networking setup.(Error 404: Not Found)
Traceback (most recent call last):
  File "/home/user/projects/tee4ehr/Main.py", line 1493, in <module>
    main()
  File "/home/user/projects/tee4ehr/Main.py", line 1382, in main
    wandb.init(config=opt, project=opt.wandb_project,
  File "/home/user/projects/tee4ehr/.venv/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 1195, in init
    wandb._sentry.reraise(e)
  File "/home/user/projects/tee4ehr/.venv/lib/python3.9/site-packages/wandb/analytics/sentry.py", line 155, in reraise
    raise exc.with_traceback(sys.exc_info()[2])
  File "/home/user/projects/tee4ehr/.venv/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 1181, in init
    return wi.init()
  File "/home/user/projects/tee4ehr/.venv/lib/python3.9/site-packages/wandb/sdk/wandb_init.py", line 785, in init
    raise error
wandb.errors.CommError: It appears that you do not have permission to access the requested resource. Please reach out to the project owner to grant you access. If you have the correct permissions, verify that there are no issues with your networking setup.(Error 404: Not Found)

Possible fix:

diff --git a/Main.py b/Main.py
--- a/Main.py   (revision eac26d73ba00dc96ab4cae7714e36fadac8d3778)
+++ b/Main.py   (date 1720599321044)
@@ -1380,7 +1380,7 @@
         # wandb.tensorboard.patch(root_logdir=opt.run_path, pytorch=True)
         # sync_tensorboard=True,
         wandb.init(config=opt, project=opt.wandb_project,
-                    entity="hokarami", name=opt.run_name, tags=[opt.wandb_tag],)
+                    name=opt.run_name, tags=[opt.wandb_tag],)
         # wandb.config.update(opt.TE_config)
         # wandb.config.update(opt.DAMconfig)
         # opt.wandb_dir = wandb.run.dir
hojjatkarami commented 1 month ago

That's True! when we use the api key, we don't need to mention entity. I have fixed the bug.

Thank you