request for alternative argparse format in sweep
See original GitHub issuewandb --version && python --version && uname
- Weights and Biases version: wandb, version 0.8.36
- Python version: Python 3.8.2
- Operating System: Darwin
Description
Sweep config file will format the hyperparams into the form of --foo=bar
doc here and code responsible.
When using with Facebook’s config library Hydra, this becomes an issue as no argparse is allowed, i.e. no --foo=bar
(see here). For instance, when wandb agent runs a command: python train.py --lr=0.02
this breaks the code that uses it; instead it needs the command to be python train.py lr=0.02
, then Hydra will pick it up.
Is it possible to allow for usage without the prefix --
? This would enable very nice pairing with Hydra to manage complex configurations while still allowing sweep to work. Plus, Hydra is getting quite popular and is used with Ax and PyTorch Lightning.
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
request for alternative argparse format in sweep #1052 - GitHub
When using with Facebook's config library Hydra, this becomes an issue as no argparse is allowed, i.e. no --foo=bar (see here).
Read more >argparse — Parser for command-line options, arguments and ...
ArgumentParser objects allow the help formatting to be customized by specifying an alternate formatting class. Currently, there are four such classes:.
Read more >Getting started | Hydra
This guide will show you some of the most important features you get by writing your application as a Hydra app. If you...
Read more >Python algorithm mimicking mark/sweep garbage collection 2.0
In this answer I'm going to discuss the general design of the garbage collection algorithm. Of course what you have here is just...
Read more >Customize argparse help message - python - Stack Overflow
Something like parser.usage = edit(parser.format_help()) , then just write a function edit to parse each line converting the help string to ...
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
Hey @kengz you can customize how your program is called and optionally omitting arguments. In this examples args is still prepended with “–”, we should expose the ability to change the prefix in this config so I’ll keep this ticket open. In the meantime you can have the sweep execute a wrapper script that modifies the parameters before calling your script:
@varun19299 , I am closing this issue, we do have some plans to integrate with other sweep tools in the future. If you want to make a new feature request we can track your request.