-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Ability to change override order #663
Comments
At least for the example above, you can already get the behavior you want.
|
Thank you, that works, but I guess, it's still would be nice to have this feature, because users may want to change their config file location without updating the code. Or if they cannot set |
I guess the proposal here is only to be able to move In a fixed environment like a container, using a fixed config location with The strongest argument for this feature would be a CLI in a library not controlled by someone. But still I am not convinced. Requesting a change in the library would be the optimal solution. And also I think there would be workarounds that wouldn't require modifying the library, which would be preferable than adding complexity to jsonargparse. For now I wouldn't plan to add this feature. But rather keep this issue open for other people to show interest. |
🚀 Feature request
Add the ability to change the override order. In the documentation it's said that CLI arguments (including config files) take precedence over env variables. It would be great to be able to configure this order.
Motivation
I think it's a valid approach to set one config file and update it with env variables. This can be very useful in containerised deployments, when services can be dynamically configured with env variables. For example, this is my entry point in the Docker image:
And I would like to update its config before start by setting the environment variable:
The text was updated successfully, but these errors were encountered: