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.

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:closed
  • Created 4 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
aosokincommented, Feb 21, 2020

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.

0reactions
omrycommented, Feb 21, 2020

Still alive in #386. I am going to comment there with a clean workaround for many of the use cases.

Read more comments on GitHub >

github_iconTop 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 >

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