Repository navigation
Conversation
### What does this PR do? Type of change: documentation **Problem:** The `tools/mcp/README.md` usage example names a real internal cluster login node as `cluster_host`. **Fix:** Replace it with the placeholder `login.cluster.example.com`, matching the `*.example.com` hosts the MCP tests already use. ### Testing Docs-only. `git grep` finds no other internal login hostnames in the tree. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: N/A - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: N/A 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated the remote Slurm workflow example to use a generic cluster login hostname consistently in the connection check and job submission examples. The sample response now uses `login` as the hostname. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d2d92b0) Co-authored-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Signed-off-by: sychen52 <41452870+sychen52@users.noreply.github.com>
### What does this PR do? Type of change: Bug fix **Problem:** `submit_job` lets the calling agent choose which code the MCP server checks out and runs locally (`uv run --with-editable`, including on `dry_run=True`): - `source_repo` accepts any git URL. - `source_ref` accepts any ref or SHA, and on GitHub the parent repo also serves refs and commits from its forks. **Fix:** - `source_repo` now accepts only the public NVIDIA/Model-Optimizer repo or the one the operator set in `MODELOPT_MCP_SOURCE_REPO`. Anything else returns `reason: source_repo_not_allowed` before any git command runs. - `source_ref` is removed from the `submit_job` tool. The ref comes only from the operator's `MODELOPT_MCP_SOURCE_REF`, defaulting to `main`. ### Testing - `cd tools/mcp && python -m pytest tests`: 92 passed, 4 skipped. - `test_ensure_source_checkout_source_repo_allowlist` covers the default repo, an env-configured fork, an unlisted URL and a local path. The two rejection cases fail without the fix. - `test_source_ref_is_operator_only` checks that the `submit_job` tool schema has no `source_ref` and that the checkout uses `MODELOPT_MCP_SOURCE_REF`. It fails without the fix. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: ❌ Agents can no longer pass `source_ref`, or a `source_repo` other than the default or `MODELOPT_MCP_SOURCE_REPO`. Operators set `MODELOPT_MCP_SOURCE_REF` / `MODELOPT_MCP_SOURCE_REPO` in the MCP server environment instead. - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: ✅ - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A - Did you get Claude approval on this PR?: ❌ 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Behavior Changes** * Managed checkouts use the operator-configured source version, defaulting to `main`. The job submission tool no longer accepts a source version; the managed checkout version is controlled through the `MODELOPT_MCP_SOURCE_REF` setting and is resolved against the selected repository. * Submissions and dry runs accept only the default Model-Optimizer repository or the operator-configured repository. Other repository URLs are rejected. * **Documentation** * Updated the submission guidance to reflect the source-version setting and repository restrictions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8579444) Co-authored-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Signed-off-by: sychen52 <41452870+sychen52@users.noreply.github.com>
### What does this PR do? Type of change: Bug fix: https://nvbugs/7126379 **Problem:** The 0.49.0rc0 documentation QA check (LLM Doc Check) caught 4 typos and missing words in published API docstrings, example READMEs, and notebooks (`count such a checkpoint one ...` missing `as`, `algorithm it to find`, `ModelOpt-Window` missing `s`, and `include you token`). **Fix:** Fixes the 4 typos in place across the docstring, two example READMEs, and one notebook markdown cell. Text-only change with no runtime or API impact. ### Usage ```python N/A ``` ### Testing - Ran `pre-commit` on all changed files (`ruff check`, `ruff format`, `mypy`, `check json`, `markdownlint-cli2`, `bandit`) and `typos`: all passed. - Verified `examples/llm_qat/notebooks/QAT_QAD_Walkthrough.ipynb` remains valid JSON with only the markdown cell text updated. ### Before your PR is "*Ready for review*" - Is this change backward compatible?: ✅ - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:N/A - Did you get Claude approval on this PR?: N/A ### Additional Information N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Corrected typos and product naming in example guides. * Clarified the expert-parallel checkpoint support documentation. * Updated the notebook’s Hugging Face token instructions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Noey Yang <174223378+noeyy-mino@users.noreply.github.com> (cherry picked from commit 9373b18) Co-authored-by: noeyy-mino <174223378+noeyy-mino@users.noreply.github.com> Signed-off-by: sychen52 <41452870+sychen52@users.noreply.github.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/0.49.0 #3538 +/- ##
==================================================
- Coverage 79.33% 71.23% -8.11%
==================================================
Files 721 721
Lines 81235 81235
==================================================
- Hits 64451 57870 -6581
- Misses 16784 23365 +6581
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Cherry-picked PRs
Summary by CodeRabbit