-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add default_config_files argument to LightningCLI.__init__ #15174
Comments
Adding more parameters to the |
Regarding |
I totally understand your concern about duplication, this is a complicated tradeoff. You are in a better position than me to decide. Then, I suggest to clarify the documentation for these points:
Also I wonder if these two "Common Workflows" sections shouldn't grouped since they are related: |
This is part of what I proposed in pull request #14976. You are welcome to review it if you like.
I completely agree. Though it might be best to do this after #14976 is merged. |
For the time being some answers to your questions:
The parsing override order is a follows:
|
@carmocca @Borda @awaelchli how about if we deprecate |
I agree. |
@VictorY-1Qbit you can review #15651 since it adds your suggestions in #15174 (comment). |
@mauvilsa Yes, I'm a bit busy but I do that ASAP. |
@mauvilsa I reviewed it with my personal account (this one) |
🚀 Feature
I suggest to add a
default_config_files
parameter inLightningCLI.__init__
.Motivation
The only way I found to change the default file to load the CLI configuration is though the
parser_kwargs
:Which took me a while to find because my first try was to override
add_default_arguments_to_parser
that way :Which is not working for some reason (related to #15038 ?).
I think that using a configuration file is a common practice (or at least it should be), thus setting up a default path should be straightforward.
Pitch
It seems more natural to pass this argument directly to
LightningCLI
(it seems to already work that way fordescription
,env_prefix
anddefault_env
).According to what I undestrand the change is fairly easy to make. Just by adding
default_config_files
inLightningCLI.__init__
, then sending to_setup_parser_kwargs
in this section:cc @carmocca @mauvilsa
The text was updated successfully, but these errors were encountered: