Skip to content
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

Fix merging of CLI args and Yaml configs in vdb_upload example #1813

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Jul 12, 2024

Description

Currently CLI args always take precedence over Yaml config values, however since most of the CLI args have a default value in practice the Yaml config values are always ignored.

  • Differentiate the explicit CLI args the user specified on the command line from the CLI args which include default values the user didn't specify.
  • Move default values out of the code blocks into global dicts
  • Fix bug type-o causing Yaml schema definitions to be ignored.
  • Resulting code is 100 lines shorter

Precedence order:

  1. Explicit CLI args
  2. Yaml config (if there is one)
  3. Default CLI args

Closes #1752

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

diferentiate the explicit cli args the user specified on the command line
from the cli args which include default values the user didn't specify.

Move default values out of the code blocks into globals

Precedence is:
Explicit cli args
Yaml config (if there is one)
Default cli args

In the previous version there were conflicting docstrings over which takes precedence, however in practice CLI args
took precenence, since there was no separation of the explicit vs default values in practice the yaml config was
never used.

Fix bug type-o causing yaml schema definitions to be ignored.
Resulting code is 122 lines shorter
@dagardner-nv dagardner-nv requested a review from a team as a code owner July 12, 2024 21:21
@dagardner-nv dagardner-nv marked this pull request as draft July 12, 2024 21:21
@dagardner-nv dagardner-nv self-assigned this Jul 12, 2024
@dagardner-nv dagardner-nv added bug Something isn't working non-breaking Non-breaking change labels Jul 12, 2024
@dagardner-nv dagardner-nv marked this pull request as ready for review July 12, 2024 21:29
@dagardner-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit ad915cb into nv-morpheus:branch-24.10 Jul 24, 2024
19 checks passed
@dagardner-nv dagardner-nv deleted the david-vdb_upload_config_defaults-1752 branch July 24, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG]: vdb_upload config values are ignored
2 participants