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

training #9

Open
ucb-pb opened this issue Jun 29, 2021 · 3 comments
Open

training #9

ucb-pb opened this issue Jun 29, 2021 · 3 comments

Comments

@ucb-pb
Copy link

ucb-pb commented Jun 29, 2021

Thank you for sharing your work! I'm trying to figure out how to start training, but am not very familiar with hydra and am running into errors with it. I modified conf/dataset.yaml, but also changed it back to what it was originally and it still gives the same error. Perhaps you might have an idea what the problem is?

File "train.py", line 279, in <module>
   main()
 File "/usr/local/lib/python3.8/dist-packages/hydra/main.py", line 49, in decorated_main
   _run_hydra(
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/utils.py", line 367, in _run_hydra
   run_and_report(
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/utils.py", line 214, in run_and_report
   raise ex
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/utils.py", line 211, in run_and_report
   return func()
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/utils.py", line 368, in <lambda>
   lambda: hydra.run(
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/hydra.py", line 110, in run
   _ = ret.return_value
 File "/usr/local/lib/python3.8/dist-packages/hydra/core/utils.py", line 233, in return_value
   raise self._return_value
 File "/usr/local/lib/python3.8/dist-packages/hydra/core/utils.py", line 160, in run_job
   ret.return_value = task_function(task_cfg)
 File "train.py", line 73, in main
   train_collate_fn = dataset.get_collate_fn(mode='train', channels_last=cfg.trainer.channels_last)
 File ".../u-2-net-portrait/lib/data/dataset.py", line 74, in get_collate_fn
   transforms[configuration.identifier] = [instantiate(step) for step in steps]
 File ".../u-2-net-portrait/lib/data/dataset.py", line 74, in <listcomp>
   transforms[configuration.identifier] = [instantiate(step) for step in steps]
 File "/usr/local/lib/python3.8/dist-packages/hydra/_internal/instantiate/_instantiate2.py", line 182, in instantiate
   raise InstantiationException(
hydra.errors.InstantiationException: Top level config has to be OmegaConf DictConfig, plain dict, or a Structured Config class or instance

As a side note, a requirements.txt file would be useful to include in this repo

@Testhjf
Copy link

Testhjf commented Jan 6, 2022

@ucb-pb have you solve the problem?i have theproblem

@gyupro
Copy link

gyupro commented Jan 19, 2022

I solved this problem. Remove hydra and hydra-core and reinstall hydra-core by typing pip install hydra-core==1.1.0.dev3

@dbpprt
Copy link
Owner

dbpprt commented Feb 1, 2022

There is an environment.yaml file in the repository to be used with conda as alternative for a requirements.txt

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

4 participants