cuopt-numerical-optimization-api-python: catalog onboarding prep - #1344
Conversation
Aligns with the NVIDIA Agent Skills Publishing Onboarding Guide: * Add top-level SECURITY.md so the catalog's "Getting Help & Contributing" links resolve once this repo is registered in components.d/<slug>.yml (guide §"Recommended Repository Layout"). * Wire .github/CODEOWNERS and .github/workflows/pr.yaml so doc-only edits to SECURITY.md don't trigger the full CI matrix (cpp-build, python-build, docs-build, conda-build path-filter blocks). * Shorten cuopt-skill-evolution SKILL.md description to fit the 50-150 char range the NV-BASE quality scorer recommends. The previous CI run reported "Description very long" (guide §"Writing Skills for Good Agent Triggering"). Per-skill description and PII-array changes for the other skills moved to dedicated follow-up PRs (#1343, #1344, #1345, #1346) so each PR's CI scope is limited to one skill. No behavior change; documentation/metadata only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR updates the cuOpt numerical optimization Python skill docs: shortens the SKILL.md front-matter description, reformats a large-expression example, revises the skill card and BENCHMARK evaluation content, and regenerates the skill.oms.sig DSSE attestation bundle. ChangesDocumentation & attestation updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py (1)
18-20: ⚡ Quick winUse descriptive return parameter names with units/context.
At Line 18–20,
r1/r2/r3obscures meaning. Prefer names likereturn_stock_a,return_stock_b,return_stock_c(or similar) to make problem-space and units explicit.As per coding guidelines, for
**/*.{cu,cuh,hpp,cpp,py}: “Flag misleading names hiding GPU/CPU boundaries, units, or problem-space context”.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py` around lines 18 - 20, The variables r1, r2, r3 are ambiguous; rename them to descriptive, unit-aware names (e.g., annual_return_stock_a, annual_return_stock_b, annual_return_stock_c or return_pct_stock_a etc.) inside model.py and update all references in the same module (and any functions/classes that use r1/r2/r3 such as the portfolio construction or expected return calculations) so names convey asset identity and units (percent/decimal) and preserve existing numeric values and types.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py`:
- Around line 18-20: The change in model.py introduced/edited the constants r1,
r2, r3; add pytest unit tests under python/cuopt/cuopt/tests that import the
module (e.g., from
skills.cuopt_numerical_optimization_api_python.assets.portfolio import model or
the correct package path) and assert the expected numeric values for r1, r2, r3
(0.12, 0.08, 0.05) and any related behavior/usage of those constants; name the
test file something like test_model_constants.py and include clear assertions
and minimal fixtures to keep examples validated as they evolve.
In `@skills/cuopt-numerical-optimization-api-python/SKILL.md`:
- Line 4: Add the required NVSkills CI trigger and signature check before
merging: post a PR comment containing the exact text "/nvskills-ci" and verify
the signature commit referenced in this
skills/cuopt-numerical-optimization-api-python/SKILL.md change (the signature
commit that signed the skills/** files) is still present in the PR commits; only
merge after adding the comment and confirming the signature commit exists.
---
Nitpick comments:
In `@skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py`:
- Around line 18-20: The variables r1, r2, r3 are ambiguous; rename them to
descriptive, unit-aware names (e.g., annual_return_stock_a,
annual_return_stock_b, annual_return_stock_c or return_pct_stock_a etc.) inside
model.py and update all references in the same module (and any functions/classes
that use r1/r2/r3 such as the portfolio construction or expected return
calculations) so names convey asset identity and units (percent/decimal) and
preserve existing numeric values and types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f9adcb5a-5245-4511-96aa-d722baad09a0
📒 Files selected for processing (4)
skills/cuopt-numerical-optimization-api-python/SKILL.mdskills/cuopt-numerical-optimization-api-python/assets/mps_solver/results.mdskills/cuopt-numerical-optimization-api-python/assets/portfolio/model.pyskills/cuopt-numerical-optimization-api-python/references/qp_examples.md
| r1 = 0.12 | ||
| r2 = 0.08 | ||
| r3 = 0.05 |
There was a problem hiding this comment.
Add/adjust Python unit tests for this code change.
This .py change should be accompanied by tests under python/cuopt/cuopt/tests to keep examples validated as they evolve.
As per coding guidelines, for **/*.{cpp,cc,cxx,c,h,hpp,py}: “Add unit tests for code changes; refer to python/cuopt/cuopt/tests for Python pytest examples”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/cuopt-numerical-optimization-api-python/assets/portfolio/model.py`
around lines 18 - 20, The change in model.py introduced/edited the constants r1,
r2, r3; add pytest unit tests under python/cuopt/cuopt/tests that import the
module (e.g., from
skills.cuopt_numerical_optimization_api_python.assets.portfolio import model or
the correct package path) and assert the expected numeric values for r1, r2, r3
(0.12, 0.08, 0.05) and any related behavior/usage of those constants; name the
test file something like test_model_constants.py and include clear assertions
and minimal fixtures to keep examples validated as they evolve.
| name: cuopt-numerical-optimization-api-python | ||
| version: "26.08.00" | ||
| description: Solve Linear Programming (LP), Mixed-Integer Linear Programming (MILP), and Quadratic Programming (QP, beta) with the Python API. Use when the user asks about optimization with linear or quadratic objectives, linear constraints, integer variables, scheduling, resource allocation, facility location, production planning, portfolio optimization, or least squares. | ||
| description: Solve LP, MILP, QP (beta) with cuOpt Python API — linear/quadratic objectives, integer variables, scheduling, portfolio, least squares. |
There was a problem hiding this comment.
Trigger NVSkills CI validation for this skills/ PR.
Please add a PR comment with /nvskills-ci and confirm the signature commit is still present before merge.
As per coding guidelines, for skills/**/*: “request NVSkills CI validation by commenting /nvskills-ci and ensure the signature commit remains in the PR”.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/cuopt-numerical-optimization-api-python/SKILL.md` at line 4, Add the
required NVSkills CI trigger and signature check before merging: post a PR
comment containing the exact text "/nvskills-ci" and verify the signature commit
referenced in this skills/cuopt-numerical-optimization-api-python/SKILL.md
change (the signature commit that signed the skills/** files) is still present
in the PR commits; only merge after adding the comment and confirming the
signature commit exists.
Shorten the SKILL.md description to fit the 50-150 char range the NV-BASE quality scorer recommends. The previous CI run reported "Description very long" (NVIDIA Agent Skills Publishing Onboarding Guide § "Writing Skills for Good Agent Triggering"). No behavior change; documentation/metadata only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
90cb95f to
f32426a
Compare
|
/nvskills-ci |
Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Summary
Shorten the SKILL.md description to fit the 50-150 char range the NV-BASE quality scorer recommends — the previous CI run reported "Description very long" (NVIDIA Agent Skills Publishing Onboarding Guide § "Writing Skills for Good Agent Triggering").
No behavior change; documentation/metadata only.
Split out from #1310.
Test plan
🤖 Generated with Claude Code