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

Key error when running the code #2

Open
AdarshMJ opened this issue Mar 23, 2024 · 2 comments
Open

Key error when running the code #2

AdarshMJ opened this issue Mar 23, 2024 · 2 comments

Comments

@AdarshMJ
Copy link

Hi, I am unable to run the code. I keep getting this error -

Traceback (most recent call last):
  File "/usr/local0/Adarsh/DRew-main/lrgb/main.py", line 104, in <module>
    load_cfg(cfg, args)
  File "/home/rml/.local/lib/python3.10/site-packages/torch_geometric/graphgym/config.py", line 500, in load_cfg
    cfg.merge_from_file(args.cfg_file)
  File "/home/rml/.local/lib/python3.10/site-packages/yacs/config.py", line 213, in merge_from_file
    self.merge_from_other_cfg(cfg)
  File "/home/rml/.local/lib/python3.10/site-packages/yacs/config.py", line 217, in merge_from_other_cfg
    _merge_a_into_b(cfg_other, self, self, [])
  File "/home/rml/.local/lib/python3.10/site-packages/yacs/config.py", line 478, in _merge_a_into_b
    _merge_a_into_b(v, b[k], root, key_list + [k])
  File "/home/rml/.local/lib/python3.10/site-packages/yacs/config.py", line 491, in _merge_a_into_b
    raise KeyError("Non-existent config key: {}".format(full_key))
KeyError: 'Non-existent config key: train.mode'

Im not sure how to fix this. Any suggestions would be helpful.

@AdarshMJ
Copy link
Author

I also keep getting this error -

Traceback (most recent call last):
  File "/usr/local0/Adarsh/DRew-main/lrgb/main.py", line 141, in <module>
    optimizer = create_optimizer(model.parameters(),cfg)
  File "/home/rml/.local/lib/python3.10/site-packages/torch_geometric/graphgym/optim.py", line 38, in create_optimizer
    return from_config(func)(params, cfg=cfg)
  File "/home/rml/.local/lib/python3.10/site-packages/torch_geometric/graphgym/config.py", line 582, in wrapper
    raise ValueError(f"'cfg.{arg_name}' undefined")
ValueError: 'cfg.optimizer_config' undefined

I have followed the instructions on running the code but it has too many errors.

@BenGutteridge
Copy link
Owner

I think this is a torch (and possibly pyg) version issue

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