Skip to content

Conversation

@dnandakumar-nv
Copy link
Contributor

@dnandakumar-nv dnandakumar-nv commented Oct 2, 2025

Description

Update CLI documentation with Optimize command

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • 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.

Summary by CodeRabbit

  • Documentation
    • Added an “Optimize” section to the CLI reference covering the nat optimize command for hyperparameter and prompt optimization.
    • Documented key options: --config_file, --dataset, --result_json_path, --endpoint, and --endpoint_timeout.
    • Included usage examples, including a local configuration invocation.
    • Clarifies underlying approach and links to the reference guide, improving discoverability for tuning workflows.

Revised the listed outputs to reflect changes in file naming and structure, including the addition of `optimized_config.yml` and trial details. Clarified the location and format of visualization artifacts for better user understanding.

Signed-off-by: dnandakumar-nv <[email protected]>
Revised the listed outputs to reflect changes in file naming and structure, including the addition of `optimized_config.yml` and trial details. Clarified the location and format of visualization artifacts for better user understanding.

Signed-off-by: dnandakumar-nv <[email protected]>
Standardize bullet point formatting in the outputs section of the README for better readability and consistency. Adjusted indentation to align all items properly.

Signed-off-by: dnandakumar-nv <[email protected]>
Updated the README to provide more details on the naming conventions for numeric trial configuration files and prompt generation history files. This improves clarity for users analyzing specific trials or generations.

Signed-off-by: dnandakumar-nv <[email protected]>
Updated the README to provide more details on the naming conventions for numeric trial configuration files and prompt generation history files. This improves clarity for users analyzing specific trials or generations.

Signed-off-by: dnandakumar-nv <[email protected]>
Corrected the capitalization of "Pareto" in the README for consistency and updated the vocabulary in the Vale configuration to include "Pareto" as an accepted term.

Signed-off-by: dnandakumar-nv <[email protected]>
The new `nat optimize` command enables automated hyperparameter tuning and prompt engineering for workflows using the NeMo Agent toolkit. Detailed explanations of options, usage examples, and references to the Optimizer Guide have been included to assist users.

Signed-off-by: dnandakumar-nv <[email protected]>
…c-fix

# Conflicts:
#	docs/source/reference/cli.md
@dnandakumar-nv dnandakumar-nv requested a review from a team as a code owner October 2, 2025 23:24
@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 2, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai
Copy link

coderabbitai bot commented Oct 2, 2025

Walkthrough

Added a new "Optimize" section to the CLI reference documenting the nat optimize command, its options, usage, example invocation, and that it uses Optuna (numerical) and a genetic algorithm (prompt). The new section is duplicated in the same file.

Changes

Cohort / File(s) Summary
Docs: CLI Reference
docs/source/reference/cli.md
Added an "Optimize" section for the nat optimize command: synopsis, options (--config_file, --dataset, --result_json_path, --endpoint, --endpoint_timeout, etc.), description mentioning Optuna and GA, example local invocation, and link to the Optimizer Guide. The section appears twice in the file.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor User
    participant CLI as nat CLI
    participant Optimizer as Optimizer (Optuna + GA)
    participant Dataset as Dataset / Local Data
    participant Endpoint as Model Endpoint
    participant Results as Results (JSON)

    User->>CLI: run `nat optimize --config_file ...`
    CLI->>Optimizer: load config, start optimization
    Optimizer->>Dataset: read dataset (if provided)
    Optimizer->>Endpoint: evaluate trials (prompt/hyperparams)
    Endpoint-->>Optimizer: return evaluation metrics
    Optimizer-->>Results: write best results to `--result_json_path`
    CLI-->>User: print summary / location of results
    note right of Optimizer #e6f7ff: Uses Optuna for numeric hyperparams\nand a genetic algorithm for prompt optimization
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely describes the primary change in imperative mood by indicating an update to the CLI documentation for the optimizer feature and stays well under the character limit.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3dbb207 and 9a0f5e1.

📒 Files selected for processing (1)
  • docs/source/reference/cli.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/source/**/*.md

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

docs/source/**/*.md: Use the official naming throughout documentation: first use “NVIDIA NeMo Agent toolkit”, subsequent “NeMo Agent toolkit”; never use deprecated names (Agent Intelligence toolkit, aiqtoolkit, AgentIQ, AIQ/aiq)
Documentation sources are Markdown files under docs/source; images belong in docs/source/_static
Keep docs in sync with code; documentation pipeline must pass Sphinx and link checks; avoid TODOs/FIXMEs/placeholders; avoid offensive/outdated terms; ensure spelling correctness
Do not use words listed in ci/vale/styles/config/vocabularies/nat/reject.txt; accepted terms in accept.txt are allowed

Files:

  • docs/source/reference/cli.md
**/*

⚙️ CodeRabbit configuration file

**/*: # Code Review Instructions

  • Ensure the code follows best practices and coding standards. - For Python code, follow
    PEP 20 and
    PEP 8 for style guidelines.
  • Check for security vulnerabilities and potential issues. - Python methods should use type hints for all parameters and return values.
    Example:
    def my_function(param1: int, param2: str) -> bool:
        pass
  • For Python exception handling, ensure proper stack trace preservation:
    • When re-raising exceptions: use bare raise statements to maintain the original stack trace,
      and use logger.error() (not logger.exception()) to avoid duplicate stack trace output.
    • When catching and logging exceptions without re-raising: always use logger.exception()
      to capture the full stack trace information.

Documentation Review Instructions - Verify that documentation and comments are clear and comprehensive. - Verify that the documentation doesn't contain any TODOs, FIXMEs or placeholder text like "lorem ipsum". - Verify that the documentation doesn't contain any offensive or outdated terms. - Verify that documentation and comments are free of spelling mistakes, ensure the documentation doesn't contain any

words listed in the ci/vale/styles/config/vocabularies/nat/reject.txt file, words that might appear to be
spelling mistakes but are listed in the ci/vale/styles/config/vocabularies/nat/accept.txt file are OK.

Misc. - All code (except .mdc files that contain Cursor rules) should be licensed under the Apache License 2.0,

and should contain an Apache License 2.0 header comment at the top of each file.

  • Confirm that copyright years are up-to date whenever a file is changed.

Files:

  • docs/source/reference/cli.md
docs/source/**/*

⚙️ CodeRabbit configuration file

This directory contains the source code for the documentation. All documentation should be written in Markdown format. Any image files should be placed in the docs/source/_static directory.

Files:

  • docs/source/reference/cli.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: CI Pipeline / Check
🔇 Additional comments (1)
docs/source/reference/cli.md (1)

478-479: Fix broken Optimizer Guide link target.

../reference/optimizer.md resolves to docs/source/reference/reference/optimizer.md, which 404s and will fail the doc link checker. Point the link to the file in this directory instead (e.g., optimizer.md).

-... [NeMo Agent toolkit Optimizer Guide](../reference/optimizer.md) ...
+... [NeMo Agent toolkit Optimizer Guide](optimizer.md) ...

Likely an incorrect or invalid review comment.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dnandakumar-nv dnandakumar-nv added doc Improvements or additions to documentation non-breaking Non-breaking change labels Oct 2, 2025
@dnandakumar-nv
Copy link
Contributor Author

/ok to test c5cba4b

@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 2, 2025

/ok to test c5cba4b

@dnandakumar-nv, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@dnandakumar-nv
Copy link
Contributor Author

/ok to test c5cba4b

@copy-pr-bot
Copy link

copy-pr-bot bot commented Oct 2, 2025

/ok to test c5cba4b

@dnandakumar-nv, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@dnandakumar-nv
Copy link
Contributor Author

/ok to test 3dbb207

@willkill07
Copy link
Member

/ok to test 9a0f5e1

@willkill07
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit 4908e35 into NVIDIA:release/1.3 Oct 3, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants