Repository navigation
Add ioi benchmark and resource server - #1124
Merged
gwarmstrong merged 9 commits intoApr 28, 2026
Merged
Conversation
Switch the module-scope `from ccc_eval import CCCEvaluator` in `resources_servers/competitive_coding_challenges/app.py` to the absolute namespace-package path `from resources_servers.competitive_coding_challenges.ccc_eval import CCCEvaluator`. The old form only resolves when CCC's own directory is on sys.path — which ng_run arranges for the server's direct invocation (CWD = server dir), but is otherwise a latent footgun: any code that imports CCC from outside its own dir (for instance a subclass living in a sibling resources_servers/... directory) would hit `ModuleNotFoundError: No module named 'ccc_eval'`. The absolute form works in both contexts because ng_run also sets PYTHONPATH to the Gym root, making `resources_servers.*` resolvable as a namespace package. No `__init__.py` needed; existing tests continue to pass. Signed-off-by: gwarmstrong <[email protected]>
…chmark
Contributes both a thin subclass of competitive_coding_challenges and a
benchmark that consumes it:
- resources_servers/ioi/: subclass inheriting CCC's verify path (sandbox
compile/run, per-subtask scoring via min(test_scores) * subtask_cap)
and overriding compute_metrics + get_key_metrics to emit IOI-style
aggregates:
* ioi_total_score (0-600 on the IOI'24 scale)
* per_problem_subtask_scores (per-problem breakdown)
- benchmarks/ioi/: data prep + config layer. prepare.py downloads
open-r1/ioi + open-r1/ioi-test-cases from HuggingFace and emits
CCC-shaped artifacts (benchmark jsonl with top-level competition_id /
problem_id / subtask / subtask_score / name / question; CCC-wrapped
metadata jsonl keyed by lowercase ioi_id so a single problem_id string
matches both metadata lookup and IOI's graders/{problem_id}.cpp grader
filename convention).
Signed-off-by: gwarmstrong <[email protected]>
gwarmstrong
requested review from
aleksficek,
bxyu-nvidia,
cmunley1 and
mehrzads
April 24, 2026 22:05
…sk_scores
Adds compute_metrics() and get_key_metrics() overrides to CCC so any
benchmark using it gets competition-style aggregate metrics natively,
instead of having to subclass or post-hoc compute them:
- total_score — for each problem, the max per-subtask score pooled
across rollouts is summed; per-problem totals are then summed across
problems.
- per_problem_subtask_scores — per-problem breakdown with per-subtask
{score, max_score} and a total summary.
- Plus the standard pass@k / pass@1[avg-of-k] / majority@k from
compute_pass_majority_metrics, surfaced via get_key_metrics.
A new _lookup_subtask_cap(competition_id, problem_id, subtask) helper
mirrors the metadata branch of _subtask_max_score(self, body) for the
metrics path (which has rollout dicts, not request bodies), including
aggregation: sum_tests handling.
Tests: 17 new pytest cases covering _score_fn, _lookup_subtask_cap
(including the sum_tests aggregation), compute_metrics (cross-problem
pooling, ioi_id fallback, missing-id skip), and get_key_metrics. Existing
6 CCC tests still pass.
Signed-off-by: gwarmstrong <[email protected]>
Now that competitive_coding_challenges emits total_score and
per_problem_subtask_scores natively, the resources_servers/ioi/ subclass
that was added in commit e0ac81 is redundant. This commit:
- Deletes resources_servers/ioi/ entirely (~700 LOC of subclass +
fixtures + tests).
- Updates benchmarks/ioi/config.yaml to inherit
competitive_coding_challenges_resources_server +
competitive_coding_challenges_simple_agent directly via _inherit_from.
- Updates benchmarks/ioi/README.md to reflect the simplified shape
(verifier server is CCC; emitted metric is total_score).
End state: IOI is now a benchmark-only contribution. End-to-end smoke
(35 subtasks x 10 seeds, Nano-30B, single 8-GPU node) confirms CCC
emits the expected total_score / per_problem_subtask_scores keys.
Signed-off-by: gwarmstrong <[email protected]>
aleksficek
reviewed
Apr 28, 2026
Contributor
|
Did the skills sandbox get added to Gym public already / how does the ioi benchmark currently execute? I was told to include my ccc env in Gym public even though its missing the data and sandbox from internal to make it function |
Contributor
Author
I think the same applies here |
Contributor
What would it take to make this public? |
CCC talks to a NeMo Skills sandbox over HTTP (default http://127.0.0.1:6000/execute, env-override via NEMO_SKILLS_SANDBOX_HOST/PORT). Document the docker build + run snippet so local users can bring one up before running the benchmark. Cluster users can use Skills' nemo_gym_rollouts(with_sandbox=True) instead — separate path. Signed-off-by: gwarmstrong <[email protected]>
Brings in the main-merge state from the github-side fork (3beda8b).
Replace 'from a NeMo-Skills checkout' instruction with a one-shot git clone + docker build + docker run command so users don't have to know what NeMo-Skills is or where to find it. Signed-off-by: gwarmstrong <[email protected]>
CCC compiles/runs candidate solutions inside the NeMo Skills sandbox over HTTP. Add a self-contained git clone + docker build + docker run snippet so users don't need prior NeMo-Skills knowledge to bring one up. Mirrors the section added to benchmarks/ioi/README.md. Signed-off-by: gwarmstrong <[email protected]>
cmunley1
approved these changes
Apr 28, 2026
bxyu-nvidia
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ioi benchmark and resource server
Migrates the
ioi(International Olympiad in Informatics 2024) benchmark fromNeMo Skills into Gym. Uses execution-based verification — the
resources_servers/ioiserver is a thin subclass ofcompetitive_coding_challengesthat reuses its sandbox compile/run path andadds IOI-specific aggregate metrics on top.
Includes
resources_servers/ioi/— IOI resource server subclassing CCCscoring via
round(min(test_scores) * subtask_cap, precision), task-typedispatch).
compute_metrics()+get_key_metrics()to emit:ioi_total_score— sum across problems of the max per-subtask scorepooled across rollouts, on the native 0–600 IOI'24 scale.
per_problem_subtask_scores— per-problem breakdown with per-subtask{score, max_score}and atotalsummary.compute_pass_majority_metrics.benchmarks/ioi/— benchmark config + data prepopen-r1/ioi(problem statements + subtask scoring) andopen-r1/ioi-test-casesconfig2024(test inputs/outputs), both fromHuggingFace; 35 scoring rows (6 problems × 2–8 subtasks each).
prepare.pyemits a CCC-shaped benchmark jsonl (top-levelcompetition_id/problem_id/subtask/subtask_score/name/question) and a wrapped metadata file(
{"competition_id": "ioi24", "metadata": {"nile": {...}, ...}}).Validated against NeMo Skills
Side-by-side run with Nemotron-3-Super-120B, 50 rollouts per (problem,
subtask), T=1.0 top_p=0.95 max_output_tokens=131072, on an 8-GPU node. Skills
numbers average two independent runs (272, 276); Gym numbers come from the
CCC-backed
resources_servers/ioiimplementation this PR ships.The headline
ioi_total_scoresits within the observed run-to-run noise:four independent runs of the CCC-backed path (two intermediate variants
during migration + the final subclass) span 242–306 with a pooled stdev
of ~24 points. The implementation delta is well inside one stdev.
A cross-check of matched
(problem, subtask, seed)triples showed thatwhen both implementations
score the same generated code they produce identical per-subtask scores —
the variance is driven by vLLM seeded-sampling not being bitwise
reproducible across deployments, not by scoring-logic divergence.