Repository navigation
allow multiple comma separated env var values - #2834
Conversation
Signed-off-by: Malay Nagda <malayn@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
📝 WalkthroughWalkthroughThis PR introduces a new repeatable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can generate a title for your PR based on the changes.Add |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/performance/argument_parser.py`:
- Around line 446-447: Update the help text for the --env / -E argument to show
repeatable-flag usage instead of comma-separated values: locate the add_argument
call that defines "--env" (the string "--env" or "-E" in argument_parser.py) and
replace the example portion with a repeatable example such as "-E var1=value1 -E
var1=value2 -E var2=value3" (and mention it is repeatable) so the help clearly
demonstrates using the flag multiple times rather than using commas.
In `@scripts/performance/README.md`:
- Line 157: Fix the typo and clarify the repeatable flag usage for the -E/--env
option: remove the stray trailing quote and replace the comma-based example with
a repeatable-flag example showing separate -E occurrences (e.g., `-E var1=value1
-E var1=value2 -E var2=value3`) and mention that this is an alternative to
`--custom_env_vars`. Update the README line referencing `-E/--env` and
`--custom_env_vars` accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 05f499ef-43b2-4817-8c3f-1422aa97e3c4
📒 Files selected for processing (3)
scripts/performance/README.mdscripts/performance/argument_parser.pyscripts/performance/setup_experiment.py
| help="Set environment variable (repeatable arg). This is an alternative to --custom_env_vars \ | ||
| (--custom_env_vars is preferred for most cases). Example: -E var1=value1,value2 -E var2=value3", |
There was a problem hiding this comment.
Clarify the --env help example to match repeatable usage.
The current example still looks comma-oriented. Prefer a pure repeatable-flag example for unambiguous UX.
✏️ Suggested help-text tweak
- help="Set environment variable (repeatable arg). This is an alternative to --custom_env_vars \
- (--custom_env_vars is preferred for most cases). Example: -E var1=value1,value2 -E var2=value3",
+ help="Set environment variable (repeatable arg). This is an alternative to --custom_env_vars \
+ (--custom_env_vars is preferred for most cases). Example: -E var1=value1 -E var2=value2",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| help="Set environment variable (repeatable arg). This is an alternative to --custom_env_vars \ | |
| (--custom_env_vars is preferred for most cases). Example: -E var1=value1,value2 -E var2=value3", | |
| help="Set environment variable (repeatable arg). This is an alternative to --custom_env_vars \ | |
| (--custom_env_vars is preferred for most cases). Example: -E var1=value1 -E var2=value2", |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@scripts/performance/argument_parser.py` around lines 446 - 447, Update the
help text for the --env / -E argument to show repeatable-flag usage instead of
comma-separated values: locate the add_argument call that defines "--env" (the
string "--env" or "-E" in argument_parser.py) and replace the example portion
with a repeatable example such as "-E var1=value1 -E var1=value2 -E var2=value3"
(and mention it is repeatable) so the help clearly demonstrates using the flag
multiple times rather than using commas.
| - `-gn/--gpus_per_node`: GPUs per node. Default `None`. If not provided, will be inferred from the GPU type. | ||
| - `-cm/--custom_mounts`: Comma-separated list of host mounts to expose inside the container. | ||
| - `-ce/--custom_env_vars`: Comma-separated string of environment variables (format: `key1=value1,key2=value2`). | ||
| - `-E/--env`: Set environment variable (repeatable arg). This is an alternative to `--custom_env_vars`. (`--custom_env_vars` is preferred for most cases). Example: `-E var1=value1,value2 -E var2=value3"`. |
There was a problem hiding this comment.
Fix the -E/--env example typo and command format.
The example has a stray trailing quote and is easy to misread as comma-based input rather than repeatable flags.
✏️ Suggested doc fix
-- `-E/--env`: Set environment variable (repeatable arg). This is an alternative to `--custom_env_vars`. (`--custom_env_vars` is preferred for most cases). Example: `-E var1=value1,value2 -E var2=value3"`.
+- `-E/--env`: Set environment variable (repeatable arg). This is an alternative to `--custom_env_vars` (`--custom_env_vars` is preferred for most cases). Example: `-E var1=value1 -E var2=value2`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@scripts/performance/README.md` at line 157, Fix the typo and clarify the
repeatable flag usage for the -E/--env option: remove the stray trailing quote
and replace the comma-based example with a repeatable-flag example showing
separate -E occurrences (e.g., `-E var1=value1 -E var1=value2 -E var2=value3`)
and mention that this is an alternative to `--custom_env_vars`. Update the
README line referencing `-E/--env` and `--custom_env_vars` accordingly.
Signed-off-by: Malay Nagda <malayn@nvidia.com>
What does this PR do ?
Adds an alternative to
--custom_env_varsfor env vars with comma separated values as part of a single var.Changelog
GitHub Actions CI
See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.
Before your PR is "Ready for review"
Pre checks:
If you haven't finished some of the above items you can still open "Draft" PR.
Additional Information
Summary by CodeRabbit
Release Notes
New Features
-E/--envcommand-line argument to specify environment variables as repeatable KEY=VALUE pairs, providing an alternative to existing configuration methods.Documentation