question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

referencing files without defaults, dealing with list of files

See original GitHub issue

Hi,

Let’s say I have the following config directory.

trainer/
 | optim/
    |  sgd.yaml
    |  adam.yaml
          ....
 | models/
     |  unet.yaml
     |  restnet.yaml
          ....
 trainer_config.yaml

I would like to compose my trainer_config.yaml as follows:

optim: 
 - sgd
 - adam
models:
 - unet
 - resnet

I encounter two problems doing this:

  1. I see that hydra doesn’t let me instantiate paths to files if keys are not listed under defaults. Is there a way to compose configurations from multiple files without using defaults (the way I mentioned above)?

  2. Say to counter this problem I use defaults, then I would like my config to look like:

defaults:
  optim:
   - sgd
   - adam
  models:
   - unet
   - resnet

since my model contains two sub-models or it uses multiple optimizers. It seems that defaults does not recognize a list of config files. What is the correct way to configure such a system? Am I missing something?

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
omrycommented, May 9, 2020

@sankethvedula, this link is a part of the basic tutorial. I strongly suggest that you read the entire thing 😃

Closing, feel free to continue this on the chat.

0reactions
sankethvedulacommented, May 9, 2020

Hi Omry. thanks for the response. The link you’ve sent is helpful, I’ll try to continue this discussion on the Zulip channel – probably that’s a better place to discuss this 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How to read existing text files without defining path
To do that, right click on the file that is in your project under the solution explorer (test1. txt), select properties and then...
Read more >
Naming Files, Paths, and Namespaces - Win32 apps
Naming Conventions · Use a period to separate the base file name from the extension in the name of a directory or file....
Read more >
How to list all files in a directory with absolute paths
You can use find. Assuming that you want only regular files, you can do: find /path/to/dir -type f > listOfFiles.list. You can adjust...
Read more >
Working With Files - Gradle User Manual
Copying directory hierarchies. You may have a need to copy not just files, but the directory structure they reside in as well. This...
Read more >
Workflow syntax for GitHub Actions
You must store workflow files in the .github/workflows directory of your repository. ... For more information, see "Managing GitHub Actions settings for a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found