vturrisi / solo-learn

solo-learn: a library of self-supervised methods for visual representation learning powered by Pytorch Lightning
MIT License
1.38k stars 181 forks source link

Issue with hydra #363

Closed kkokilep closed 10 months ago

kkokilep commented 11 months ago

Hello,

Thank you for such a wonderful library! Recently I've been getting this error:

"Cannot find primary config 'config.yaml'. Check that it's in your config search path. Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace."

My code hangs after this and does not begin running. Is there a specific issue with hydra in this codebase.

Thanks for any help or guidance.

vturrisi commented 11 months ago

Hey. Can you send me which command you are running and from which directory?

kkokilep commented 8 months ago

Sorry for the delay, I was put on other projects and lost track of this one. I still have the same issue.

The command I am using is:

python3 main_pretrain.py --config-path 'scripts/pretrain/imagenet/' --config-name simclr.yaml

I am running this from the solo-learn directory. If I show the entire hydra stack trace it looks like this:

Traceback (most recent call last): File "/home/kiran/solo-learn/main_pretrain.py", line 258, in main() File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/main.py", line 94, in decorated_main _run_hydra( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra _run_app( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/utils.py", line 457, in _run_app run_and_report( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/utils.py", line 223, in run_and_report raise ex File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/utils.py", line 220, in run_and_report return func() File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/utils.py", line 458, in lambda: hydra.run( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 105, in run cfg = self.compose_config( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 594, in compose_config cfg = self.config_loader.load_configuration( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/config_loader_impl.py", line 142, in load_configuration return self._load_configuration_impl( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/config_loader_impl.py", line 253, in _load_configuration_impl defaults_list = create_defaults_list( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 745, in create_defaults_list defaults, tree = _create_defaults_list( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 715, in _create_defaults_list defaults_tree = _create_defaults_tree( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 356, in _create_defaults_tree ret = _create_defaults_tree_impl( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 457, in _create_defaults_tree_impl return _expand_virtual_root(repo, root, overrides, skip_missing) File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 280, in _expand_virtual_root subtree = _create_defaults_tree_impl( File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 464, in _create_defaults_tree_impl config_not_found_error(repo=repo, tree=root) File "/home/kiran/kiran_env/lib/python3.9/site-packages/hydra/_internal/defaults_list.py", line 799, in config_not_found_error raise MissingConfigException( hydra.errors.MissingConfigException: Cannot find primary config 'config.yaml'. Check that it's in your config search path.

Config search path: provider=hydra, path=pkg://hydra.conf provider=main, path=file:///home/kiran/solo-learn provider=schema, path=structured://

Thanks for any help!

kkokilep commented 8 months ago

I have also tried to debug this myself and from what I understand this error shouldn't show up since I'm on hydra version 1.3.

Additionally, this only happens on imagenet experiments. There haven't been any problems when running on cifar-100