Allow users to explicitly pass config files from the command-line.
See original GitHub issue🚀 Feature Request
A user should be able to explicitly pass a config file to use as a command-line argument.
Motivation
Hard-coded paths makes scripts using hydra brittle and confusing (a là the “what’s my CWD?” game). A user should be able to pass a config explicitly.
Pitch
Describe the solution you’d like
A config_file
command-line flag could be added which, when provided, is the config to be used.
Describe alternatives you’ve considered
- No command-line flag is added. A user must always ensure the hard-coded config file exists where expected.
- A default config is provided and shipped with hydra-enabled applications and overridden manually.
Are you willing to open a pull request? (See CONTRIBUTING) Probably. 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Forget command-line arguments: use a config file | Medium
It controls how config data is accessed within your code; It allows a default option to be easily set if the value is...
Read more >Which is the best way to allow configuration options be ...
I just discovered you can do this with argparse.ArgumentParser.parse_known_args() . Start by using parse_known_args() to parse a configuration file from the ...
Read more >The basics - Black 22.12.0 documentation
On Windows, this will be something like C:\\Users\UserName . You can also explicitly specify the path to a particular file that you want...
Read more >Configuration and credential file settings - AWS Documentation
You can override an individual setting by either setting one of the supported environment variables, or by using a command line parameter. For ......
Read more >git-config Documentation - Git
git config [<file-option>] [--type=<type>] [--fixed-value] ... use git config section.variable ~/ from the command line to let your shell do the expansion.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, is this still alive? I think that in machine learning applications using external config files is very handy. Say I have my training method with the default config for everything. Then, I’m doing multiple rounds of experiments. For each round, I want to define many config parameters identically but vary just one. It is very inconvenient to set up a whole bunch of non-default hyper-parameters in many launching scripts. I’d prefer to have one external (partial) config file with non-default parameters for each round and to define only the varying parameters through command line.
Still alive in #386. I am going to comment there with a clean workaround for many of the use cases.