Skip to content

skills/cuopt-numerical-optimization-api-c: Add eval - #1327

Merged
ramakrishnap-nv merged 2 commits into
mainfrom
skills-cuopt-numerical-optimization-api-c
May 28, 2026
Merged

skills/cuopt-numerical-optimization-api-c: Add eval#1327
ramakrishnap-nv merged 2 commits into
mainfrom
skills-cuopt-numerical-optimization-api-c

Conversation

@ramakrishnap-nv

@ramakrishnap-nvramakrishnap-nv commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Add eval

Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@copy-pr-bot

Copy link
Copy Markdown

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.

@ramakrishnap-nvramakrishnap-nv changed the title skills/cuopt-numerical-optimization-api-c: add Tier 3 evalskills/cuopt-numerical-optimization-api-c: Add evalMay 28, 2026
@ramakrishnap-nv
ramakrishnap-nv marked this pull request as ready for review May 28, 2026 23:14
@ramakrishnap-nv
ramakrishnap-nv requested a review from a team as a code ownerMay 28, 2026 23:14
@ramakrishnap-nv

Copy link
Copy Markdown
CollaboratorAuthor

/nvskills-ci

@ramakrishnap-nvramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels May 28, 2026
@coderabbitai

coderabbitaiBot commented May 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds an "API Call Sequence" to the cuOpt C API skill, adds an eval expecting ordered API entry-point names, reformats C example initializers and updates build instructions, expands the skill card and adds a BENCHMARK report, and replaces the Sigstore DSSE bundle.

Changes

C API Documentation and Examples

Layer / File(s)Summary
C API Call Sequence Documentation and Evaluation
skills/cuopt-numerical-optimization-api-c/SKILL.md, skills/cuopt-numerical-optimization-api-c/evals/evals.json
SKILL.md adds an "API Call Sequence" specifying header inclusion and ordered entry points (problem creation → solve → objective retrieval → destroy). A new eval (numopt-c-eval-001-milp-api-call-sequence) expects agents to return the entry-point names in sequence (names-only).
Example Code Formatting and Build Instructions
skills/cuopt-numerical-optimization-api-c/references/examples.md
Array initializers in Simple LP and MILP examples are reformatted from single-line to multi-line block initializers. Build & Run guidance now points to assets/README.md for canonical environment and compilation steps instead of inline shell snippets.
Skill card and BENCHMARK
skills/cuopt-numerical-optimization-api-c/skill-card.md, skills/cuopt-numerical-optimization-api-c/BENCHMARK.md
Skill card wording and references updated; adds an evaluation section and results table. BENCHMARK.md adds a full NVSkills-Eval report with metadata, metrics, findings, and a publication recommendation.
Sigstore DSSE bundle
skills/cuopt-numerical-optimization-api-c/skill.oms.sig
Replaces the DSSE envelope payload, updating subject digests/resources, certificate-chain verification material, and signatures.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • NVIDIA/cuopt#1301: Overlapping documentation/paths updates related to skills/cuopt-numerical-optimization-api-c.
  • NVIDIA/cuopt#1287: Related edits to SKILL.md for the same skill.

Suggested reviewers

  • Iroy30
  • tmckayus
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 inconclusive)

Check nameStatusExplanationResolution
Title check❓ InconclusiveThe title is partially related to the changeset but is overly broad and vague. While an evaluation entry is added, the PR involves multiple significant changes including documentation updates, examples revisions, benchmark report, and skill card updates.Consider a more descriptive title that better captures the scope of changes, such as 'Add cuOpt C API evaluation and update documentation' to reflect all major modifications beyond just adding an eval.
Description check❓ InconclusiveThe description is extremely vague and provides no meaningful information about what was changed or why, using only the generic term 'Add eval'.Expand the description to explain what evaluation was added, why it was needed, and provide context on the related documentation and metadata updates included in this PR.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch skills-cuopt-numerical-optimization-api-c

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

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/cuopt-numerical-optimization-api-c/SKILL.md (1)

27-27: ⚡ Quick win

Consider including solver settings creation in the API sequence.

The documented sequence omits cuOptCreateSolverSettings, which is required before cuOptSolve according to the example code in assets/lp_basic/lp_simple.c (lines 38, 98). The complete sequence is: create problem → create settings → configure settings → solve → get results → destroy all three objects.

📝 Suggested documentation improvement
-For LP/MILP, the ordered C entry points are: `cuOptCreateRangedProblem` (sense `CUOPT_MINIMIZE` / `CUOPT_MAXIMIZE`, CSR constraint matrix as `row_offsets` / `col_indices` / `values`, `var_types` char array using `CUOPT_CONTINUOUS` / `CUOPT_INTEGER` macros) → `cuOptSolve(problem, settings, &solution)` → `cuOptGetObjectiveValue(solution, &obj_value)` → matching `cuOptDestroy*` calls. Include `<cuopt/linear_programming/cuopt_c.h>`. Full ordered code with build instructions in [references/examples.md](references/examples.md).+For LP/MILP, the ordered C entry points are: `cuOptCreateRangedProblem` (sense `CUOPT_MINIMIZE` / `CUOPT_MAXIMIZE`, CSR constraint matrix as `row_offsets` / `col_indices` / `values`, `var_types` char array using `CUOPT_CONTINUOUS` / `CUOPT_INTEGER` macros) → `cuOptCreateSolverSettings(&settings)` → optional parameter configuration → `cuOptSolve(problem, settings, &solution)` → `cuOptGetObjectiveValue(solution, &obj_value)` → `cuOptDestroyProblem`, `cuOptDestroySolverSettings`, `cuOptDestroySolution`. Include `<cuopt/linear_programming/cuopt_c.h>`. Full ordered code with build instructions in [references/examples.md](references/examples.md).
🤖 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-c/SKILL.md` at line 27, The sequence
for LP/MILP documentation omits creating solver settings; update the paragraph
to include calling cuOptCreateSolverSettings (and any config steps) between
cuOptCreateRangedProblem and cuOptSolve so the full ordered flow reads:
cuOptCreateRangedProblem → cuOptCreateSolverSettings → configure settings →
cuOptSolve(problem, settings, &solution) → cuOptGetObjectiveValue(solution,
&obj_value) → matching cuOptDestroy* calls; also mention including
<cuopt/linear_programming/cuopt_c.h> as before and mirror the example in
assets/lp_basic/lp_simple.c for accuracy.
🤖 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-c/evals/evals.json`:
- Around line 4-11: Update the expected list to include the required struct
types and missing API calls in order: include
cuopt/linear_programming/cuopt_c.h, then structs cuOptOptimizationProblem,
cuOptSolverSettings, cuOptSolution, then call cuOptCreateRangedProblem,
cuOptCreateSolverSettings, cuOptSolve(problem, settings, &solution),
cuOptGetObjectiveValue, and finally cleanup with cuOptDestroyProblem,
cuOptDestroySolverSettings, cuOptDestroySolution; reference these exact symbols
(cuOptCreateRangedProblem, cuOptCreateSolverSettings, cuOptSolve,
cuOptGetObjectiveValue, cuOptDestroyProblem, cuOptDestroySolverSettings,
cuOptDestroySolution and the structs) so the eval expects both functions and
structs in the proper sequence.
---
Nitpick comments:
In `@skills/cuopt-numerical-optimization-api-c/SKILL.md`:
- Line 27: The sequence for LP/MILP documentation omits creating solver
settings; update the paragraph to include calling cuOptCreateSolverSettings (and
any config steps) between cuOptCreateRangedProblem and cuOptSolve so the full
ordered flow reads: cuOptCreateRangedProblem → cuOptCreateSolverSettings →
configure settings → cuOptSolve(problem, settings, &solution) →
cuOptGetObjectiveValue(solution, &obj_value) → matching cuOptDestroy* calls;
also mention including <cuopt/linear_programming/cuopt_c.h> as before and mirror
the example in assets/lp_basic/lp_simple.c for accuracy.
🪄 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: a204a581-f16d-4750-a98f-59aaa276ed49

📥 Commits

Reviewing files that changed from the base of the PR and between 8e534f1 and c37f8e4.

📒 Files selected for processing (3)
  • skills/cuopt-numerical-optimization-api-c/SKILL.md
  • skills/cuopt-numerical-optimization-api-c/evals/evals.json
  • skills/cuopt-numerical-optimization-api-c/references/examples.md

Comment on lines +4 to +11
"question": "I want to solve a small MILP (some integer variables, linear objective, linear constraints) with the cuOpt C API. List the C functions and structs I need in order — names only, one line each, no full source.",
"expected_skill": "cuopt-numerical-optimization-api-c",
"expected_script": null,
"ground_truth": "The agent produces an ordered list of C API entry points without writing a full source file: include cuopt/linear_programming/cuopt_c.h, then call cuOptCreateRangedProblem with sense CUOPT_MINIMIZE or CUOPT_MAXIMIZE, then cuOptSolve(problem, settings, &solution), then cuOptGetObjectiveValue.",
"expected_behavior": [
"Lists C API call sequence without writing a complete source file",
"Names cuOptCreateRangedProblem, cuOptSolve, cuOptGetObjectiveValue in order"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Align question, ground_truth, and expected_behavior for completeness.

The question asks for "C functions and structs I need in order" but the ground_truth and expected_behavior only mention functions. The complete answer should include:

Struct types:

  • cuOptOptimizationProblem
  • cuOptSolverSettings
  • cuOptSolution

Functions missing from current ground_truth:

  • cuOptCreateSolverSettings (required before solve, see lp_simple.c:38,98)
  • The three destroy functions: cuOptDestroyProblem, cuOptDestroySolverSettings, cuOptDestroySolution (mentioned in SKILL.md line 27 and used in lp_simple.c:95-97)
📝 Proposed fix to complete the evaluation criteria
 "question": "I want to solve a small MILP (some integer variables, linear objective, linear constraints) with the cuOpt C API. List the C functions and structs I need in order — names only, one line each, no full source.",
"expected_skill": "cuopt-numerical-optimization-api-c",
"expected_script": null,
- "ground_truth": "The agent produces an ordered list of C API entry points without writing a full source file: include cuopt/linear_programming/cuopt_c.h, then call cuOptCreateRangedProblem with sense CUOPT_MINIMIZE or CUOPT_MAXIMIZE, then cuOptSolve(problem, settings, &solution), then cuOptGetObjectiveValue.",+ "ground_truth": "The agent produces an ordered list of C API types and entry points without writing a full source file: include cuopt/linear_programming/cuopt_c.h, declare cuOptOptimizationProblem/cuOptSolverSettings/cuOptSolution structs, then call cuOptCreateRangedProblem with sense CUOPT_MINIMIZE or CUOPT_MAXIMIZE, cuOptCreateSolverSettings, cuOptSolve(problem, settings, &solution), cuOptGetObjectiveValue, and the three cuOptDestroy* functions.",
"expected_behavior": [
"Lists C API call sequence without writing a complete source file",
- "Names cuOptCreateRangedProblem, cuOptSolve, cuOptGetObjectiveValue in order"+ "Names the three struct types (cuOptOptimizationProblem, cuOptSolverSettings, cuOptSolution)",+ "Names cuOptCreateRangedProblem, cuOptCreateSolverSettings, cuOptSolve, cuOptGetObjectiveValue, and destroy functions in order"
]
🤖 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-c/evals/evals.json` around lines 4 -
11, Update the expected list to include the required struct types and missing
API calls in order: include cuopt/linear_programming/cuopt_c.h, then structs
cuOptOptimizationProblem, cuOptSolverSettings, cuOptSolution, then call
cuOptCreateRangedProblem, cuOptCreateSolverSettings, cuOptSolve(problem,
settings, &solution), cuOptGetObjectiveValue, and finally cleanup with
cuOptDestroyProblem, cuOptDestroySolverSettings, cuOptDestroySolution; reference
these exact symbols (cuOptCreateRangedProblem, cuOptCreateSolverSettings,
cuOptSolve, cuOptGetObjectiveValue, cuOptDestroyProblem,
cuOptDestroySolverSettings, cuOptDestroySolution and the structs) so the eval
expects both functions and structs in the proper sequence.

Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
@copy-pr-bot

Copy link
Copy Markdown

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.

@ramakrishnap-nv

Copy link
Copy Markdown
CollaboratorAuthor

/ok to test 1279c54

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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-c/skill-card.md`:
- Around line 60-61: The markdown linter rule MD058 is triggered because the
table starts immediately after the heading "## Evaluation Results:"; fix it by
inserting a single blank line between the heading line that contains "##
Evaluation Results:" and the table start row beginning with "| Dimension" so the
table is separated from the heading and passes markdownlint; after editing, run
pre-commit hooks (pre-commit run --all-files --show-diff-on-failure) to verify.
🪄 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: e71a500e-a2a6-48b6-a403-1067bc99cf57

📥 Commits

Reviewing files that changed from the base of the PR and between c37f8e4 and 1279c54.

📒 Files selected for processing (3)
  • skills/cuopt-numerical-optimization-api-c/BENCHMARK.md
  • skills/cuopt-numerical-optimization-api-c/skill-card.md
  • skills/cuopt-numerical-optimization-api-c/skill.oms.sig
✅ Files skipped from review due to trivial changes (1)
  • skills/cuopt-numerical-optimization-api-c/BENCHMARK.md

Comment on lines +60 to +61
## Evaluation Results: <br>
| Dimension | Num | `claude-code` | `codex` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a blank line before the results table to satisfy markdownlint.

MD058 is triggered because the table starts immediately after the heading text. Insert a blank line between Line 60 and Line 61.

Proposed fix
 ## Evaluation Results: <br>
+
| Dimension | Num | `claude-code` | `codex` |
|---|---:|---:|---:|

As per coding guidelines, "Use pre-commit run --all-files --show-diff-on-failure to check code formatting and linting on all files before committing".

📝 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.

Suggested change
## Evaluation Results: <br>
| Dimension | Num |`claude-code`|`codex`|
## Evaluation Results: <br>
| Dimension | Num |`claude-code`|`codex`|
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 61-61: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)

🤖 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-c/skill-card.md` around lines 60 -
61, The markdown linter rule MD058 is triggered because the table starts
immediately after the heading "## Evaluation Results:"; fix it by inserting a
single blank line between the heading line that contains "## Evaluation
Results:" and the table start row beginning with "| Dimension" so the table is
separated from the heading and passes markdownlint; after editing, run
pre-commit hooks (pre-commit run --all-files --show-diff-on-failure) to verify.

@ramakrishnap-nv
ramakrishnap-nv merged commit 34c2be7 into mainMay 28, 2026
23 checks passed
@ramakrishnap-nvramakrishnap-nv mentioned this pull request Jul 8, 2026
3 tasks
@ramakrishnap-nv
ramakrishnap-nv deleted the skills-cuopt-numerical-optimization-api-c branch July 9, 2026 18:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvementImproves an existing functionalitynon-breakingIntroduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ramakrishnap-nv@tmckayus@svc-nvskills-signing