diff --git a/.agents/skills/codabench-benchopt/SKILL.md b/.agents/skills/codabench-benchopt/SKILL.md new file mode 100644 index 0000000..4cc67a7 --- /dev/null +++ b/.agents/skills/codabench-benchopt/SKILL.md @@ -0,0 +1,115 @@ +--- +name: codabench-benchopt +description: > + Designing and operating a machine-learning competition on Codabench whose + evaluation is a benchopt benchmark — where each decision belongs (benchmark + vs phase config vs ingestion vs scoring vs competition.yaml vs worker), the + design forks that are genuinely open (training on the platform or not, + metric in the objective or in the scoring program, hosted or self-hosted + workers, how many phases), and how much to hide from participants at what + cost. Also the evaluation protocol the platform design rests on: single + sealed split vs cross-validation, leakage in the split, and the distribution + shift between public and ranked data. Consult when setting up or reviewing a + competition bundle, an ingestion/scoring program, a phase input_data + directory, a hidden/sealed test phase, a self-hosted compute worker, or when + deciding what goes in the public starting kit. Trigger words: Codabench, + competition bundle, competition.yaml, ingestion program, scoring program, + input_data, reference_data, phase, sealed phase, hidden test set, + leaderboard, starting kit, submission contract, compute worker, + hide_prediction_output, leakage, train/test split, cross-validation, group + split, distribution shift, benchopt competition. +--- + +# Benchopt-powered Codabench competitions + +**The benchmark is the competition.** The platform is a scheduler and a +leaderboard; the programs it runs are adapters. Everything here serves one +invariant — participants run the same code the server runs. + +## Start here: protocol, then forks, then build + +**Step 0 is the evaluation protocol**, not the platform: cross-validation or a +single sealed split, how the split is cut, what shift sits between what +participants develop on and what ranks them +([data-and-splits.md](./data-and-splits.md)). The forks below inherit it. + +Then settle these, in order — each narrows the ones after it. Ask if they are +not on record rather than picking silently +([design-decisions.md](./design-decisions.md)): + +1. Does the platform train, or only run inference on a shipped model? +2. How many phases — one, a development/final pair, or more? +3. Where is the metric computed — objective, or scoring program? +4. Hosted Codabench workers, or a self-hosted queue? +5. Where does the benchmark live — phase bundle, or baked into the image? +6. Is the submission environment frozen, or resolved per submission? + +## Layer map + +| Layer | Artifact | Owns | +|---|---|---| +| Benchmark | `tracks//{objective,datasets,solvers}`, or `benchmark/` for a single track | task, loaders, submission contract, and the metric *if* you score there | +| Submission | `submission.py` + weights and/or training code | the model, nothing else | +| Phase | `input_data/` = `config.yaml` (+ benchmark, + sealed `datasets/*.py`) | which data, which split, seed, training on or off, leaderboard column map | +| Ingestion | `ingestion_program/` | filesystem wiring; exec `benchopt run` | +| Scoring | `scoring_program/` | results → `scores.json`, parsing or computing the metric | +| Competition | `competition.yaml` | windows, quotas, visibility flags, pages, image | +| Infra | image + worker + staging | environment, data residency, mounts, queue | + +Per-layer boundaries and traps: [responsibilities.md](./responsibilities.md). + +## Invariants, whichever fork you take + +- **One code path.** The benchmark participants run locally is the benchmark the + server runs. No platform detection, no "server mode" branch in the objective. +- **Task in the benchmark, configuration in the phase.** Whatever a phase may + change *without changing the task* — dataset and parameters, seed, training + on/off, leaderboard column map — lives in the phase config, not the objective + and not the image. +- **Fail loudly at every boundary.** The characteristic failure here is not a + crash, it is a plausible wrong number on a leaderboard nobody can re-derive + three weeks later. +- **Placement is per artifact, not per repo.** Everything shipped in a phase is + readable by every submission container; everything in the public repo is + readable by everyone ([sensitivity.md](./sensitivity.md)). +- **Minimize what differs between phases.** Each difference is a code path first + exercised where mistakes are unfixable. Some designs legitimately change more + than the data — pay that knowingly, and rehearse before the phase opens. + +## Starting point: the template + +Start a new single-track competition from +[`x-datascience-datacamp/template_codabench`](https://github.com/x-datascience-datacamp/template_codabench), +a GitHub template repo. It encodes the defaults: training on the platform, +one phase with hidden private columns, metric in the objective, benchmark +shipped in the phase `input_data`, frozen environment, data built by +`Dataset.prepare()`, and CI end to end on `Simulated`. Its README lists the adaptation steps in +order. Change the template itself rather than diverging copies, so fixes +reach the next competition. + +## Reference implementation + +For multi-track and sealed-phase designs: the NeurIPS 2026 neural-interfaces +competition — `2026-neurips_compet-eeg` +(public benchmark + bundles) and its private ops repo (Terraform workers, phase +publishing). Four tracks, one image, warm-up on public proxy data and a sealed +final phase on a held-out cohort; metric in the objective, inference-only, +self-hosted workers. + +**Its code encodes its forks. Re-check each piece against yours before copying +it.** Copying it verbatim into a single-track port means deleting, unless your +fork needs them: + +- The objective `training` toggle. Only needed when phases differ (fork 1). +- Symlink dereferencing and the dangling-link guard. These come from + multiple tracks sharing code through symlinks. +- The sealed `datasets/*.py` drop-in. Only for a sealed phase that ships its + split as code. +- The no-config auto-detect fallback in scoring. With one phase config, read + `config["scoring"]["columns"]` and fail otherwise. +- The workdir copy and solver install in ingestion. They predate benchopt path + selectors ([responsibilities.md](./responsibilities.md)). + +For a single track, put the benchmark in its own `benchmark/` folder rather +than the repo root, so it is clear what is benchopt and what is the Codabench +wrapper. diff --git a/.agents/skills/codabench-benchopt/data-and-splits.md b/.agents/skills/codabench-benchopt/data-and-splits.md new file mode 100644 index 0000000..a7dafea --- /dev/null +++ b/.agents/skills/codabench-benchopt/data-and-splits.md @@ -0,0 +1,108 @@ +# Step 0: the evaluation protocol + +Settle before the forks: the protocol decides fork 1 (a protocol needing +server-side cross-validation can only be training-on-platform) and fork 2 +(whether a sealed split exists at all). Deciding it after the benchmark is +written means rewriting the benchmark. + +## Cross-validation or a single sealed split + +Rule of thumb: **scarce data needs CV; expensive or confidential data needs a +privacy design that CV does not fit.** Most competitions sit between and must +choose. + +- Few independent units (subjects, sessions, sites — not rows) means a single + split's variance can exceed the gap between the top entries. If you rank on + one split anyway, estimate that variance first and use it to decide whether + the top-k are distinguishable before awarding anything on the difference. +- CV puts every sample in a test fold, so you cannot cross-validate *and* keep + a fold hidden. The only way to have both is server-side CV under + training-on-platform (fork 1 B), at k times the compute. +- Under inference-only submissions, server-side CV means the submission ships + k models. If you get there, the ranking wanted a single sealed split. + +Common compromise: rank on a single sealed split, and ship a CV configuration +over the public data so participants model-select against something other than +the leaderboard. + +## Leakage in the split + +The split is part of the task definition, and in a competition its failure mode +is specific: a leak ships inside the starting kit, every participant inherits +it, a participant finds it publicly mid-phase, and it cannot be fixed without +invalidating the leaderboard. + +Train and test must be independent for the generalization the leaderboard +claims to measure. Beyond the usual group, temporal and duplicate leaks, one +case is easy to get wrong: + +- **Several axes at once.** When an observation is a combination (gene × + condition, user × item, subject × stimulus), holding out "new A × new B" is an + L-shaped split: A-test units still appear in train with B-train, and the + reverse. That is by design, so do not assert A disjointness across sides. + Assert instead that each axis label is constant per unit (a unit is test on + that axis everywhere), and that no *cell* is shared. An axis held out + completely (a new species, a new site) must be disjoint. + +What follows from it: + +- Split on the coarsest unit that differs at deployment — by subject for "works + on a new subject", by site for "works at a new site". Recording-level for + windowed signals, plus a gap at the boundary when windows overlap. +- The *target* leaks even when the input does not: one stimulus seen by many + subjects lets a model retrieve instead of predict. Deduplicate on the target. +- Anything fitted on the full dataset (normalization, PCA, channel selection) + belongs inside the training fold — in a competition this one is not a private + mistake, it is shipped code. +- Ids, file names and row order are readable to every submission, since a phase + bundle is ([sensitivity.md](./sensitivity.md)). Strip what should not be. + +Test it: assert the independence above in the split script (no unit on both +sides of a fully held-out axis, no shared cell otherwise), and run a **cheating +baseline** on ids and metadata alone. Above chance means the split leaks. + +## Check the metric against sensible baselines + +Before opening, score a trivial floor and a simple model on every ranked subset: +the simple model must clearly beat the floor (else the task is broken or +impossible) and leave room above it (else it is trivial). Seed them so the +numbers are reproducible. Three less obvious traps: + +- **Probabilistic metrics.** Under a likelihood, a constant with a wide, + well-calibrated spread can be a hard floor a decent point predictor loses to. +- **Heavy-tailed per-observation losses.** A count likelihood (NB, Poisson) + grows like `y · log(1/mu)` when `mu` is near 0, so one bad prediction on a + highly expressed observation can outweigh thousands of rows. Look at the + per-observation loss of the reference (max, top-10 share) and cap it (e.g. + at about 15× a typical row) rather than ranking on a mean one row decides. + Clip the baselines' `mu` away from 0, too: `expm1` of a negative log + prediction is negative, and a clip at 0 then predicts zero counts. +- **The synthetic smoke-test dataset needs the same check**, with enough signal + that the reference beats the floor, or the smoke test passes on a pipeline + that cannot learn. + +When a public half shows on the leaderboard and a hidden half ranks, halve each +held-out region by the unit that is new in it (gene, run, subject), with a hash +of its key, so the same unit falls in the same half everywhere. A region with no +new unit can be halved by observation. Then score the reference on both halves: +they should agree within noise. + +## Name the shift you are measuring + +Any gap between what participants develop on and what ranks them — public proxy +vs hidden cohort, development vs final phase — is what the leaderboard actually +measures. + +- Separate shift you **chose** (different site, hardware or population, because + generalizing across it is the research question) from shift you **inherited** + (the proxy is an older, dirtier dataset). Announce the first; reduce the + second. +- **Measure it before opening**: train a baseline on the public part, evaluate + on the sealed part. If two baselines swap order, that is what participants + will experience as randomness. This doubles as the end-to-end rehearsal of the + sealed phase. +- Declare it on the participation page — "developed on cohort X, ranked on + cohort Y recorded with the same hardware" is also the honest reading of the + numbers when they are later cited. + +What to publish of the data: dial 1 of [sensitivity.md](./sensitivity.md). diff --git a/.agents/skills/codabench-benchopt/design-decisions.md b/.agents/skills/codabench-benchopt/design-decisions.md new file mode 100644 index 0000000..96c8ff2 --- /dev/null +++ b/.agents/skills/codabench-benchopt/design-decisions.md @@ -0,0 +1,170 @@ +# The open design decisions + +Six forks with no universally right answer. **Do not start from the benchmark** +— what the objective returns, what a submission is, what the image contains and +whether a staging pipeline exists at all descend from these. If you are asked +to scaffold a competition and they are not on record, ask; if the user has no +opinion, propose a default *with its cost* rather than picking silently. Record +the answers in the repo. + +Two preconditions, neither a platform decision: the evaluation protocol +([data-and-splits.md](./data-and-splits.md), which may already decide fork 1) +and what must stay hidden ([sensitivity.md](./sensitivity.md), which constrains +forks 1, 2 and 4). + +Listed in dependency order — each narrows the ones below: + +| # | Decision | Determines | +|---|---|---| +| 1 | Does the platform train? | the submission contract, the objective's parameters, the time limit and the compute bill | +| 2 | How many phases? | how many data configurations exist, the windows, whether a sealed split exists | +| 3 | Where the metric is computed? | what the objective returns, what scoring does, what `reference_data/` holds, what `hide_*` means | +| 4 | Hosted or self-hosted workers? | whether you own staging, mounts and a queue — half of [responsibilities.md](./responsibilities.md) | +| 5 | Where the benchmark lives? | the bundle/build tooling and the release cadence | +| 6 | Frozen or resolved environment? | the Dockerfile, the dependency contract, whether the container needs network | + +## 1. Does the platform train? + +**A — inference-only.** The submission is a trained model (code + weights); the +server runs `predict`. Compute per submission is small and predictable. Forces a +public or proxy training split, and forfeits adaptation to the evaluation cohort. + +**B — training on the platform.** The submission is a training recipe; the phase +hands over a train loader. Everyone trains on identical hardware under an +identical budget — a comparison of methods rather than of compute access — and +the training data can stay hidden. Costs: the execution time limit must cover +training (× the quota = the GPU bill), scores become seed- and budget-sensitive, +and a training crash on the server is far harder to debug than a local one. + +First because it defines the submission contract, which the benchmark, the +sample submission and every participant-facing page are written against. It may +also be forced: a protocol cross-validating over data participants never hold +can only be B. + +Wire the fork so one benchmark serves both and nothing branches on "am I on the +platform", and so the *absence* of training reaches the solver as +`train_loader=None` rather than a boolean it might ignore (a phase that staged +only a test split then cannot accidentally train). This competition put +`training` on the **objective** (`-o "Obj[training=True]"`, selected by the phase +config); in hindsight that is probably the wrong axis — it is unrelated to the +data yet participants must set it alongside `-d`, and hiding it took a dedicated +training-config file. Prefer carrying it on the **dataset** instead: a training +dataset variant supplies the `train_loader`, the evaluation variant supplies +none, so whether-to-train falls out of the `-d` selection participants already +make. (Not worth retrofitting the 2026 competition — note it for the next.) + +The toggle only earns its place when phases differ. If every phase trains, drop +it entirely: the objective always hands over the training data and the base +solver's `run` always calls `fit`, locally and on the server. A `training` +parameter added "for flexibility" in a train-only competition is dead +configuration. + +Mixed designs (a warm-up that trains, a final that does not) are legitimate, but +that is a second variable changing between phases — see the invariants in +[SKILL.md](./SKILL.md). + +## 2. How many phases + +**A — one.** No staging switchover, no deadline to miss. The leaderboard *is* +the ranking, so every submission probes the data that decides prizes, bounded +only by the quota — and the first time the stack runs under real load is the +competition itself. + +**B — development + final.** Long development phase on public or proxy data +with a generous quota, short final phase on the held-out cohort with a tight one +and hidden outputs. Bounds probing of the ranking data, puts the support load +where mistakes are still fixable, and makes the development phase the rehearsal +for the final. Costs: two data configurations, a mid-competition switchover, and +a resubmission step participants reliably forget. + +**C — more than two.** For genuinely multi-round designs. Each phase is another +staging event and another deadline, and the overhead multiplies by tracks. + +Whatever the count: + +- **Submissions do not carry over.** Entering the final phase is a fresh upload; + say so on the participation page and again when the phase opens. +- **Phase windows must not touch** — an end equal to the next start is rejected + as a conflict; end at `23:59:59`. The ranked phase must be unambiguous in the + rules *and* in the platform's phase flags. +- **Stage before the window opens**, while the worker still serves the previous + phase: either a second worker or disk sized for two phases. A switchover + discovered at the boundary is downtime on the phase that matters most. +- If all you want is bounded leaderboard overfitting, one phase scored on two + subsets — one surfaced, one held back for the ranking — gets most of it for a + fraction of the ops. Verify your Codabench version can hide a leaderboard + column before building on it. + +## 3. Where the metric is computed + +**A — in the objective; scoring parses.** `evaluate_result` returns the metrics, +they land as `objective_` columns, scoring maps columns to leaderboard +keys. One implementation of the metric, participants get the exact leaderboard +number from a local `benchopt run`, and `reference_data/` stays empty because no +labels reach the scoring step. + +**B — the objective returns raw predictions; scoring scores them.** The classic +Codabench shape. Benchopt packs non-scalar objective columns at write time, so +scoring must rematerialize with `benchopt.results.read_results` — a plain +`pd.read_parquet` returns the packed blob, not the array. + +- B keeps the metric code and the ground truth out of the container the + submission runs in, and lets you re-score stored predictions after the fact (a + metric bug, an added ranking). Under A the number is all you kept. +- A is exercised by every local run; under B the metric has no local code path, + so it needs its own tests and documentation. +- B moves prediction-sized arrays through the results file — check the size for + your largest phase; embeddings per test window are not class labels. + +## 4. Hosted workers or self-hosted + +**A — the public Codabench queue.** No infrastructure. Requires the evaluation +data to be fetchable by a worker you do not control, and gives no say over +hardware, disk or isolation. + +**B — self-hosted on your own queue.** Required when the data may not leave your +control, or for specific GPUs, large disk or a guaranteed slot. You inherit +provisioning, staging, mount policy, queue credentials and the bill; everything +in [responsibilities.md](./responsibilities.md) about staging and read-only +mounts applies to this branch only. + +Mostly decided by the two above: hidden data, or training on the platform at any +scale, rules out A. + +## 5. Where the benchmark lives + +**A — in the phase bundle**, the image carrying the environment only. One image +serves every track and phase, and a sealed phase can ship a modified benchmark +with no rebuild. Costs an assembly step — and if shared code is symlinked into +the phase directories, every copy must dereference (`cp -rL`, `tar -czh`, +`copytree`, `os.walk(followlinks=True)`); `Path.rglob` does not descend into a +symlinked directory and silently yields a benchmark with no shared code. + +**B — baked into the image.** No assembly, and the image tag pins the evaluation +exactly. Costs a build and push per benchmark change, an image variant per track +or phase that differs, and a sealed split living in the image — so a private +registry and pull credentials on the worker. + +**Default: A, even for one track and one phase.** The benchmark is a few tens +of KB of Python, so shipping it costs nothing, and a fix to a loader or the +metric is a phase push (`push.py`) rather than an image build and push. The +image then changes only when a dependency does. For a single track the +assembly step is one more `_add_dir` in the bundle builder, with no symlinks. +Staging then prepares the data from that same phase directory, not from a +benchmark copy baked into an older image ([responsibilities.md](./responsibilities.md), +Infra). + +## 6. Submission environment: frozen or resolved + +**A — frozen image.** A pinned requirements file is the contract; nothing +installs at submission time. Participants are restricted to that stack, and a +new dependency means an image release mid-competition. + +**B — resolved per submission**, solvers declaring their own requirements. Costs +network egress from the evaluation container (which undercuts a hidden-data +story), install time inside the execution limit, and environments that differ +between two runs of the same submission. + +Middle path: freeze the image, publish the requirements file early, and run a +documented process for adding to it — so the constraint is negotiable before +people have trained against the wrong stack. diff --git a/.agents/skills/codabench-benchopt/responsibilities.md b/.agents/skills/codabench-benchopt/responsibilities.md new file mode 100644 index 0000000..8b1233a --- /dev/null +++ b/.agents/skills/codabench-benchopt/responsibilities.md @@ -0,0 +1,221 @@ +# Who owns what + +Per layer: what it decides, what it must not, and the trap when the boundary is +crossed. Boundaries that depend on an unsettled fork point at +[design-decisions.md](./design-decisions.md). + +## Benchmark (the benchopt repo) + +**Owns** data loading, the `meta` keys handed to a submission, batch shapes, the +base solver class that spells out the contract — and the metric, if you score in +the objective (fork 3). **Not** which dataset instance runs, the seed, +leaderboard names, or anything with a date or a quota in it. + +- The benchmark *is* the starting kit and *is* what the server runs: a plain + `benchopt run ` must reproduce a platform evaluation. Any + competition-only knob in the objective (a `track` parameter, an env var read, + a branch on "am I on the platform") forfeits that. +- Whether the platform trains is phase-level. When phases differ, carry it on + the **dataset** the phase config selects (fork 1), not two benchmarks, not a + server-side flag. Keeping it implicit in the solver's arguments (no train + loader rather than `training=False`) means a phase that staged only a test + split cannot accidentally train. When every phase trains, there is no toggle + at all. +- Make `benchopt test` exercise paths the phases you run today never take — + otherwise the untaken half is first tested by participants, or on the day you + open a phase that uses it. + +## Submission + +**Owns** the model, and the training recipe if the platform trains. + +Ingestion loads it by path (`-s /submission.py`), so the base class finds +its shipped files from `inspect.getfile(type(self))` with no env var. The same +file then works locally and on the platform. Loading by path has one +consequence to state on the participation page: **all Python code lives in that +single file**, because sibling `.py` files are not importable. The folder may +still hold non-code files (weights, configs). For the inference-only shape it +ships as code + weights. A `save_model` +hook that zips solver + weights at the end of a training run lets participants +*produce* the upload artifact from a local run — it removes an entire class of +"my zip had the wrong layout" tickets. + +## Phase (`input_data/`) + +**Owns** dataset name and parameters, seed, whether this phase trains, the +leaderboard-key → results-column map, and for a sealed phase the dataset module +defining the split. + +- Keep it a **native `benchopt run --config` file** plus the minimum of + competition-only keys, stripped by ingestion before the run (benchopt rejects + unknown options) and forwarded to scoring. A local run config at the + repository root mirrors it, plus the solvers to run, and drives both + `benchopt prepare --config` and `benchopt run --config` locally. +- If the benchmark travels in the phase (fork 5), this directory is the unit + published *and* staged, and symlinked shared code must be dereferenced at + every copy — see fork 5. + +## Ingestion program + +**Owns** wiring only. benchopt takes paths, so ingestion needs no workdir copy +and no solver install: + + benchopt run -s /submission.py \ + --config --output /results.parquet \ + -r 1 --no-cache --no-plot --no-html --no-display + +What remains is to write the run config (the phase config minus its +competition-only keys), exec, and forward the config to scoring. Path loading +also means ingestion never imports the submission itself. A sealed phase that +ships `datasets/*.py` passes them the same way (`-d `). Copying the +benchmark to a workdir and dropping the submission into `solvers/` is only the +fallback for a benchopt without path selectors. Run this way, benchopt writes +nothing into the benchmark, so it runs as is from a read-only `input_data`. + +- **Refuse to run when the phase config is missing.** Without `-d`, benchopt + runs *every* dataset in the benchmark — on a sealed phase that is a runaway + bill and an evaluation on data the phase never meant to touch. +- Debug flag on, so a broken submission aborts with its traceback instead of an + empty results frame that scoring reports as a missing column. Caching off: two + submissions can carry the same solver name, and a cache outliving one of them + is both a wrong score and a channel between participants. +- If the benchmark travels in the phase through a symlink (fork 5 A), check the + *unresolved* path when guarding against a dangling link. `.resolve()` flattens + a broken symlink into an ordinary missing path and the error loses its cause. +- `benchopt run` does not call `Dataset.prepare()` unless passed `--prepare`, + and ingestion runs `--no-cache` without it — so at eval time `get_data` is the + only thing that readies data. Have it load already-prepared data and fail + loudly if the staged data is missing (prepare is the explicit staging step), + not silently re-download or repeat the extraction. +- **Data preparation is `Dataset.prepare()`, not a `tools/setup_data.py`.** + Fetching, converting and splitting the raw data belongs to the dataset that + loads it, so participants and the staging step both run + `benchopt prepare -d ` and get the same files. A side + script duplicates the split logic outside the benchmark and drifts from the + loader. Prepare writes the sealed split only when its raw source is present + (the worker), and the public kit prepares the public part only. Make that + a dataset parameter the phase config sets (`mode=full` versus the default + `mode=public`), with `full` failing loudly without the raw source. The raw + source sits in a private bucket prefix that staging mirrors for prepare and + deletes before publishing the data to the workers. Synthetic + data for CI goes in the `Simulated` dataset, not in a `--demo` flag. + Trap: benchopt caches `prepare` in `/__cache__` without checking + its output. After deleting the data or changing `BENCHOPT_DATA_HOME` it + reports "cached" and writes nothing, so pass `--force`, and say so in the + `get_data` error for missing data. + +## Scoring program + +**Owns** results dataframe → flat `scores.json`, and the metric if you score +here (fork 3). Either way, a score the phase declared but that is missing or NaN +must fail loudly — a silent zero reaches the leaderboard and is found weeks +later. + +`reference_data/` follows the same fork: scoring in the objective means no +labels reach this step, so it is a documented placeholder and the scoring +program stays public even for a sealed phase; scoring here means it holds the +ground truth and inherits the phase's confidentiality. + +## `competition.yaml` + +**Owns** everything with a date, a quota or a visibility flag: windows, +submissions per day and total, execution time limit, `hide_*`, pages, the Docker +image, the leaderboard columns. + +- Leaderboard column keys must match the scoring output keys exactly — the most + common silent failure, and it shows as an empty column, not an error. +- **Phase windows must not touch**: an end equal to the next start is rejected + as a conflict. +- **Leaderboard column titles are capped at 36 characters** (keys too). A longer + one fails the bundle upload with a garbled message (`'int' object has no + attribute 'items'`): Codabench's error formatter crashes on the nested + validation error and hides which field it was. +- The yaml is authoritative for dates and prose pages drift from it immediately + — keep the prose thin and point at the platform's own phase display. +- Once live, the yaml is no longer the deployed state: the bundle is an + initialiser and later edits go through the REST API. Keep the repo yaml as the + intended state and reconcile deliberately. +- **Leaderboard columns change only through the competition PATCH, with the + phases in the same request.** `/api/leaderboards/` is read-only, and the + competition view saves `leaderboards[0]` only when `phases` is present (else + a 500, nothing applied). It rewrites each sent phase's `public_data` and + `starting_kit`, so send them. Columns sent with their id keep their scores. +- **Hidden columns are absent from `/api/submissions//` scores**, even for + an organizer. To check a private column fills, read `scores.json` from the + `scoring_result` zip of `get_details`. + +## Infra: image, worker, staging + +**Owns** the environment and where the data physically lives. The staging points +apply to a self-hosted queue (fork 4); on hosted workers they are someone else's +problem, and so is the guarantee they provide. + +- **One directory is the source of truth for a phase**, pushed both to the + platform and to the worker — otherwise what a submission runs and what was + staged can diverge, which is quiet, since both halves work on their own. But + the two halves deploy differently: the **code** (config + ingestion/scoring + programs) is *published* to the platform and delivered per-job, while the + heavy **data** is *staged* worker-local and mounted. A config or program + change is a re-publish; a data change is a re-stage — confuse them and new + code runs on old data, or the reverse. +- **Stage from the phase directory itself.** Ship the phase `input_data` (the + same bytes the platform gets) to the worker, then run, in the competition + image, `benchopt prepare /app/input_data/benchmark --config + /app/input_data/config.yaml`. Mount `input_data` read-only and set + `BENCHOPT_CACHE` to a path inside the container. Otherwise the prepare cache + lands in the read-only benchmark, or outlives the data and reports "cached" + on the next staging. `prepare --config` reads only the `dataset` key, so the + datasets come from the phase config, never from a second list in the infra + config. Ship the programs and the sample submission with it for the + read-only check below. Staging is then a script run from the checkout, not + a re-provisioning, and it never needs the benchmark inside the image. +- **Provisioning and staging are separate.** Provisioning leaves the worker + *stopped*; staging pushes the phase, prepares the data, then starts it. A + worker booting into a queue with no data fails every submission it picks up. +- **Mount the data read-only** if your datasets tolerate it: runs then hit warm + caches or fail loudly rather than downloading inside the execution limit. + Validate by running the sample submission through the ingestion and scoring + programs during staging, with the data read-only. That is what catches a + dataset that writes at load time, and a missing leaderboard column. Replaying + `prepare` read-only does not: submissions never call it, and a `prepare` + that rebuilds its outputs every time fails that replay for nothing. If `prepare` fans out across + processes, its workers can race a shared on-disk cache and corrupt it on a + large study; serialize the extractor for those datasets. +- **A read-only data mount cannot double as a writable cache.** Pointing a model + cache (HF, torch) at it breaks a participant's own `from_pretrained`, which + must write. Pre-stage the shared weights once, then have ingestion + symlink-mirror them into each container's writable default cache — reuse with + no download inside the limit, and it works offline for a sealed phase. Declare + the pre-staged models in the *public* repo so participants can rely on and PR + the list. +- **Submission containers run as root and inherit the docker daemon's defaults** + — a self-hosted worker spawns them over the socket with no `--user`, no + `--shm-size`. The 64 MB default `/dev/shm` then kills any DataLoader with + `num_workers>0` on large tensors; raise the daemon-wide `default-shm-size` in + provisioning, the only lever you have. +- **One worker serves one phase.** Bounds the disk, and bounds what a submission + reaches if the container boundary fails. +- Publish the environment contract early, whichever fork 6 branch you took: + participants need to know what they may import before they train. + +## CI for the competition repo + +Test the same path the platform runs: `benchopt test `, a smoke +`benchopt run` on the synthetic dataset, then build the bundle and run its +ingestion and scoring programs end to end, asserting that `scores.json` holds +every leaderboard key. CI has no real data and needs no data step: swap the +dataset in the bundled phase config for `Simulated` (`sed -i +'s//Simulated/' _bundle//input_data/config.yaml`). This works +because `Simulated` emits the same test subsets as the real dataset. Traps +that each cost a red run: + +- `benchopt test` needs `pytest` installed explicitly. +- `benchopt prepare` caches into `/__cache__`, which flake8 then + fails on. Exclude `__cache__` in the lint step. +- A CUDA torch image runs out of disk on a GitHub runner when exported. CI only + needs to know the image builds, so build a CPU variant (a `TORCH_CHANNEL` + build arg selecting the wheel index) with `load: false` and free runner disk + first. Production keeps the CUDA channel. +- The sample submission lives outside `solvers/`, so `-s ` cannot select + it in a smoke run. Smoke-run the benchmark's own solvers and exercise the + submission through the end-to-end ingestion step. diff --git a/.agents/skills/codabench-benchopt/sensitivity.md b/.agents/skills/codabench-benchopt/sensitivity.md new file mode 100644 index 0000000..d3de4df --- /dev/null +++ b/.agents/skills/codabench-benchopt/sensitivity.md @@ -0,0 +1,119 @@ +# Information sensitivity: what to hide, and what it costs + +Decide first whether you are hiding anything. A competition on fully public +data, ranked on a reproducible split, is legitimate and by far the cheapest to +run. Everything below is the price of the alternative — spend it where a hidden +cohort buys something concrete: a licence that forbids redistribution, a +generalization claim a public test set cannot support, or prize money large +enough to pay for cheating. + +## Three tiers, and where each artifact goes + +**Public — the starting kit.** Benchmark code, the submission contract, proxy +dataset modules, the ingestion and scoring programs, the Dockerfile and +requirements, the pages, a sample submission. Plus the metric, unless you +deliberately moved it out of the container (fork 3) — hiding it buys little, +since participants infer it from the leaderboard, and costs the one-code-path +property. + +**Published to a phase — readable by every submission container.** The phase +`config.yaml` and a sealed phase's `datasets/*.py`. Tempting to treat as private +because they are not in the public repo; they are not. **Treat everything in a +phase bundle as disclosed the moment the phase opens** — what leaks is the split +logic, dataset identifiers and the seed. If you mind, the split has to live in +the staged data, not in a module shipped beside it. + +**Never published.** Credentials always — queue broker URL, infrastructure state +files, API tokens. And, with a hidden cohort, the raw held-out data: staged +out-of-band onto the worker, never in a bundle, never in an API-visible dataset. +This tier is what forces a self-hosted queue (fork 4). + +> Make the publisher refuse anything outside an explicit allowlist of names and +> directories. One stray state file published as `input_data` is a credential +> rotation — the mistake a hand-rolled `zip -r` makes on its first run. Related: +> a competition's REST dump embeds the queue credential in clear text. Match +> skip and allow patterns against the path *relative to the bundled root*. A +> skip name like `data` matched against absolute path parts silently drops every +> file once the checkout lives under a `/data/...` mount. + +## What the visibility flags actually do + +`hide_output`, `hide_prediction_output` and `hide_score_output` close the +**feedback channel**, not the data channel: they make iterative probing of a +hidden split — reconstructing labels a few bits per submission — expensive +rather than free. + +They do nothing about exfiltration, since a submission is arbitrary code sitting +next to the evaluation data. That is bounded by the read-only mount, no network +egress, one phase per worker, the quota, and a **reproducibility audit of the +top-k before prizes**. Announce the audit: it is the only one of those that does +not depend on the sandbox holding. + +What the flags hide depends on fork 3. Score in the objective and "prediction +output" is the results dataframe. It holds every metric the objective returns, +not only the ones the leaderboard shows. With `hidden: True` leaderboard columns +(one phase scored on a public and a private subset), the results dataframe and +`scores.json` both carry the private scores. A hidden column only hides the +leaderboard cell, so set both `hide_prediction_output` and `hide_score_output`. +Without hidden columns the flag buys almost nothing. Score in the scoring +program and it is per-sample predictions, a real channel. Hiding the *scoring* +output is the expensive one either way: it removes the error traces participants +debug with, so make the development phase generous enough that nobody needs to +debug in the final one. + +## The dials, and the cost of each + +**1 — How much data is public.** From everything public, through a public proxy +beside a hidden cohort, to nothing public. The middle is the usual compromise +and you pay in distribution shift — a leaderboard that does not rank the way the +proxy did. Pick the proxy that matches the hidden cohort on the axis that +matters to the model's input (acquisition hardware, montage, sampling rate) +rather than the one with the most samples. Releasing nothing is defensible under +a licence, but then you owe participants a simulated dataset they can at least +run the contract against. + +**2 — Hidden dataset identity.** Blocks targeted pretraining and leakage through +public annotations of the same recordings; costs participants any domain +reasoning and costs you questions you cannot answer. Commit upfront to +disclosing at phase close — late disclosure is what makes the competition +reproducible without being leaky beforehand. + +**3 — Who holds the training data** (the confidentiality half of fork 1). If the +platform trains, participants never hold any of it. If submissions arrive +pre-trained, some training data must be public or proxied and only the +evaluation cohort stays hidden. Decide the fork on its merits first; this is its +consequence, not a separate knob. + +**4 — Submission quota = leakage budget.** Submissions-per-day prices +information extraction. A generous warm-up on public data plus a tight sealed +phase (order 1/day, small lifetime cap) puts iteration where it is free and +bounds probing where it is not. + +**5 — Asymmetric phases** (if you run more than one — fork 2). The asymmetry +belongs in the data and the visibility flags, not in the code that runs: +anything first executed in the final phase executes where you cannot fix it. If +the phases must differ structurally (training in one, not the other), rehearse +the final configuration on throwaway data before it opens. + +**6 — Isolation versus deterrence.** Any submission runs beside the staged +data, so it can read the hidden files and print them in its logs or send them +over the network. A hidden leaderboard column stops none of that. Technical +isolation (hiding logs, blocking egress, running the visible part as a user +that cannot read the sealed files) costs participants their debugging output +and costs you ingestion complexity. When submissions are code the organizers +read, as in a course, a stated sanction (a zero grade, failing the course) +plus a final code review is the proportionate choice. Reserve isolation for +open competitions with anonymous entrants and prizes. + +## Tell participants the map + +Publish the public/hidden split as a table on the participation page: what +differs between phases (the data, and the dataset identity until disclosure) and +what is identical (image, programs, objective, `meta` keys, batch shapes, their +own submission). Then the rule that follows: **use only `meta` and the batches +you are given** — a solver reading a dataset name, a file path, a subject id or +a hard-coded channel count may break on data it has never seen. + +That reframing is the part worth copying: it turns a confidentiality property +participants have no reason to care about into a portability rule that protects +their own score. diff --git a/.claude/skills/codabench-benchopt b/.claude/skills/codabench-benchopt new file mode 120000 index 0000000..1149013 --- /dev/null +++ b/.claude/skills/codabench-benchopt @@ -0,0 +1 @@ +../../.agents/skills/codabench-benchopt \ No newline at end of file diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml new file mode 100644 index 0000000..0fdd27f --- /dev/null +++ b/.github/workflows/images.yml @@ -0,0 +1,43 @@ +# Build and push the base images codabench-benchopt (CPU) and +# codabench-benchopt-gpu (CUDA) to the GitHub container registry. +name: Base images + +on: + push: + branches: [main] + paths: [tools/Dockerfile.base, .github/workflows/images.yml] + workflow_dispatch: + +jobs: + push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + strategy: + matrix: + include: + - {name: codabench-benchopt, torch: cpu} + - {name: codabench-benchopt-gpu, torch: cu126} + steps: + - uses: actions/checkout@v4 + - name: Free disk space + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true + sudo rm -rf /usr/local/.ghcup || true + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/build-push-action@v6 + with: + file: ./tools/Dockerfile.base + push: true + build-args: TORCH_CHANNEL=${{ matrix.torch }} + tags: | + ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}:latest + ghcr.io/${{ github.repository_owner }}/${{ matrix.name }}:${{ github.sha }} + cache-from: type=gha,scope=${{ matrix.name }} + cache-to: type=gha,mode=max,scope=${{ matrix.name }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 896570e..d3641fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,89 +1,65 @@ -# Test that the docker image builds correctly -# and that running the ingestion and scoring programs works -# Also use cache for the data and the docker image. -name: Test Docker Image +# CI: lint + benchopt design tests + a native end-to-end ingestion/scoring +# run on the Real dataset, plus a Docker image build. +name: Test on: - push: - branches: [ main ] - pull_request: + push: + branches: [main] + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - test: - runs-on: ubuntu-latest - env: - DOCKER_IMAGE_NAME: docker-codabench-test + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + - name: Install + run: | + pip install -U pip flake8 pytest + # CPU torch first, so requirements.txt keeps it (no CUDA wheels). + pip install torch --index-url https://download.pytorch.org/whl/cpu + pip install -r requirements.txt + - name: Lint + run: flake8 . --max-line-length=79 --exclude=.git,worktrees,__cache__ + - name: benchopt design tests + run: benchopt test benchmark --skip-install + - name: Smoke run on Simulated + run: | + benchopt run benchmark --config local_config.yml -d Simulated \ + --no-cache --no-plot --no-html --no-display + - name: Build bundle + end-to-end ingestion + scoring (Real) + # The template's stand-in data ships with scikit-learn. If your data + # cannot be prepared in CI, run this step on Simulated instead: it + # has no private labels, so the private score is not checked. + run: | + benchopt prepare benchmark --config local_config.yml + python tools/create_bundle.py + python -c "import zipfile; zipfile.ZipFile('bundle.zip').extractall('_codabench/bundle')" + python _codabench/bundle/ingestion_program/ingestion.py \ + --submission-dir _codabench/bundle/solution \ + --input-data _codabench/bundle/main_phase/input_data \ + --output-dir _codabench/ingestion + python _codabench/bundle/scoring_program/scoring.py \ + --prediction-dir _codabench/ingestion \ + --reference-dir _codabench/bundle/main_phase/reference_data \ + --output-dir _codabench/scoring + python -c "import json, yaml; s=json.load(open('_codabench/scoring/scores.json')); \ + keys={c['key'] for b in yaml.safe_load(open('competition.yaml'))['leaderboards'] for c in b['columns']}; \ + assert keys <= set(s), (keys, s); print('scores OK:', s)" - steps: - - name: Delete huge unnecessary tools folder - run: | - echo "################################" - echo "Disk usage BEFORE cleanup:" - echo "################################" - df -h - - echo "Removing .NET..." - rm -rf /usr/share/dotnet || true - - echo "Removing Android SDK..." - sudo rm -rf /usr/local/lib/android || true - - echo "Removing GHC / Haskell..." - rm -rf /opt/ghc || true - sudo rm -rf /usr/local/.ghcup || true - - echo "################################" - echo "Disk usage AFTER cleanup:" - echo "################################" - df -h - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker build - uses: docker/build-push-action@v6 - with: - file: ./tools/Dockerfile - push: false - load: true - tags: ${{ env.DOCKER_IMAGE_NAME }} - # Use GitHub Actions (GHA) as the cache backend - # 'cache-from' attempts to restore layers from previous runs - cache-from: type=gha,scope=${{ env.DOCKER_IMAGE_NAME }}-${{ hashFiles('**/Dockerfile') }}-${{ hashFiles('**/requirements.txt') }} - # 'cache-to' saves the new layers after the build finishes - cache-to: type=gha,mode=max,scope=${{ env.DOCKER_IMAGE_NAME }}-${{ hashFiles('**/Dockerfile') }}-${{ hashFiles('**/requirements.txt') }} - - - uses: actions/setup-python@main - with: - python-version: '3.12' - pip-install: -r requirements.txt - cache: 'pip' # caching pip dependencies - - name: Prepare input/output directories - run: python tools/setup_data.py - - - name: Test ingestion program - run: | - docker run --rm -u root \ - -v "./ingestion_program":"/app/ingestion_program" \ - -v "./dev_phase/input_data":/app/input_data \ - -v "./ingestion_res":/app/output \ - -v "./solution":/app/ingested_program \ - --name ingestion ${{ env.DOCKER_IMAGE_NAME }} \ - python /app/ingestion_program/ingestion.py - - - name: Test scoring program - run: | - docker run --rm -u root \ - -v "./scoring_program":"/app/scoring_program" \ - -v "./dev_phase/reference_data":/app/input/ref \ - -v "./ingestion_res":/app/input/res \ - -v "./scoring_res":/app/output \ - --name scoring ${{ env.DOCKER_IMAGE_NAME }} \ - python /app/scoring_program/scoring.py + docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build the CPU base image and the competition image on top + run: | + docker build -f tools/Dockerfile.base -t codabench-benchopt-test . + docker build -f tools/Dockerfile -t codabench-compet-test \ + --build-arg BASE=codabench-benchopt-test . diff --git a/.gitignore b/.gitignore index 9728749..0abf21a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,15 @@ -*.csv .DS_Store *.pyc -*.xml +__pycache__/ *.zip -ingestion_res/* -scoring_res/* -dev_phase/* +# benchopt run outputs and caches +outputs/ +__cache__/ +.pytest_cache/ +# local data home (benchopt prepare output) +data/ +# local bundle / ingestion / scoring test runs +_codabench/ +# installed by `benchopt sync-skills`, kept in sync with benchopt +.agents/skills/using-benchopt +.claude/skills/using-benchopt diff --git a/README.md b/README.md index 56384d2..9036bb1 100644 --- a/README.md +++ b/README.md @@ -1,135 +1,244 @@ -# Template to create a codabench bundle for ML competition in python - -The code in this repository is a template to create a codabench bundle for a -machine learning competition in python. -It sets up a dummy classification task, evaluated with accuracy metric on a -public and private test set. - -## Structure of the bundle - -- `competition.yaml`: configuration file for the codabench competition, - specifying phases, tasks, and evaluation metrics. -- `ingestion_program/`: contains the ingestion program that will be run on - participant's submissions. It is responsible for loading the code from the - submission, passing the training data to train the model, and generating - predictions on the test datasets. It contains: - * `metadata.yaml`: A file describing how to run the ingestion program for - `codabench`. For a single script ingestion program in `ingestion.py`, no - need to edit it. - * `ingestion.py`: A script to run the ingestion. The role of this script is - to load the submission code and produce predictions that can be evaluated - with the `scoring_program`. - In our example, `the submission.py` define a `get_model` function that - returns a scikit-learn compatible model. This model is then fitted on the - training data calling `fit`, and the `predict` method is used to generate - predictions on the test data. These predictions are stored as a csv file, - to be loaded with the `scoring_program`. -- `scoring_program/`: contains the scoring program that will be run to evaluate - the predictions generated by the ingestion program. It loads the predictions - and the ground truth labels, computes the evaluation metric (accuracy in this - case), and outputs the score. It contains: - * `metadata.yaml`: A file describing how to run the scoring program for - `codabench`. For a single script ingestion program in `scoring.py`, no - need to edit it. - * `scoring.py`: A script to run the scoring. This script loads the - prediction dumped from the ingestion program and produce a single json - file containing the scores associated with the submission. - In our example, we compute `accuracy` on two test sets (public and - private) as well as runtime. -- `solution/`: contains a sample solution submission that participants can use - as a reference. Here, this is a simple Random Forest classifier. This file is - gives the user the structure of the code they need to submit. In our example, - the user needs to submit a `submission.py` file with `get_model` function that - returns a scikit-learn compatible model. -- `*_phase/`: contains the data for a given phase, including input data and - reference labels. Running `tools/setup_data.py` will generate dummy data for a - development phase. For a real competition, this data should be replaced with - the actual data. -- `pages/`: contains markdown files that will be rendered as web pages in the - codabench competition. -- `requirements.txt`: contains the required python dependencies to run the - challenge. - -## Extra scripts in the `tools/` folder - -- `tools/setup_data.py`: script to generate dummy data for the competition. - This should be changed to load and preprocess real data for a given - competition. -- `tools/create_bundle.py`: script to create the codabench bundle archive from - the repository structure. -- `tools/Dockerfile`: Dockerfile to build the docker image that will be used to - run the ingestion and scoring programs. -- `tools/run_docker.py`: convenience script to build and test the docker image - locally without knowing docker commands. See [here](#setting-up-and-testing-the-docker-image) for more details. - -## Instruction to create the codabench bundle - -Make sure that the `setup_data.py` script has been run to generate the data for -the competition. - -Then, run the `create_bundle.py` script to create the codabench bundle archive: +# Template for a benchopt-powered Codabench competition + +This repository is a template to create a machine-learning competition on +[Codabench](https://www.codabench.org) whose evaluation is a +[benchopt](https://benchopt.github.io) benchmark. It sets up a dummy binary +classification task, scored by accuracy with 5-fold cross-validation (CV) and +on a public and a private test set. + +**The benchmark is the competition.** Participants run locally, with +`benchopt run`, exactly the code the server runs. The Codabench ingestion and +scoring programs are thin wrappers around it: + +- **Ingestion** runs the benchmark on a submission. Each repetition trains it + on one CV fold, scores it on the held-out part of the fold and on the + public test set, and returns its predictions on the private test set. +- **Scoring** scores these predictions against the private labels, which + only it can read (the phase `reference_data`), and averages every score + over the folds. + +The metric lives in one place, `benchmark/benchmark_utils/metric.py`, which +both the objective and the scoring program import. + + +## DataCamp course: instructions and grading + +Your challenge is graded on the three points of +[What the starting kit must show](#what-the-starting-kit-must-show): the data +is interesting, the question is interesting and this data can answer it, and +the evaluation can answer the question. Only what the starting kit shows +counts. + +To hand in: + +- [ ] Everything in [Before opening the competition](#before-opening-the-competition) + is checked. +- [ ] The starting kit is executed and committed with its outputs. +- [ ] The repository link and the Codabench competition link are sent to the + instructors. + + +## Documentation and AI skills + +- **benchopt documentation**: . Start with the + [user guide](https://benchopt.github.io/stable/user_guide/) and the + [seeding guide](https://benchopt.github.io/stable/user_guide/controlling_randomness.html) + for cross-validation. +- **Codabench documentation**: , in particular the + [competition bundle](https://docs.codabench.org/latest/Organizers/Benchmark_Creation/Competition-Bundle-Structure/) + page. +- **AI agent skills**, in `.agents/skills/` (mirrored in `.claude/skills/` + for Claude Code). Coding agents (Claude Code, Codex, Copilot, Cursor, + Gemini CLI...) load them when you open the repository. They are plain + Markdown, so you can also read them yourself. + - `using-benchopt`: writing and running benchopt datasets, objectives and + solvers. It ships with benchopt and matches your installed version: + install it with `benchopt sync-skills` from the repository root, and + re-run it after a benchopt upgrade. + - [`codabench-benchopt`](.agents/skills/codabench-benchopt/SKILL.md): + designing a benchopt-powered Codabench competition. Read + [`data-and-splits.md`](.agents/skills/codabench-benchopt/data-and-splits.md) + before choosing your split: it covers cross-validation versus a sealed + split, leakage, baselines and the public/private shift. + +## Layout + +| Path | Content | +|---|---| +| `template_starting_kit.ipynb` | skeleton of the participants' starting kit, with the EDA and the evaluation | +| `benchmark/objective.py` | the task: what the solver receives, the CV scheme and the metric | +| `benchmark/datasets/real.py` | the real data: `prepare()` builds the splits, `get_data()` loads them | +| `benchmark/datasets/simulated.py` | synthetic data with the same keys, for smoke tests and CI | +| `benchmark/benchmark_utils/base_solver.py` | the submission contract (`CompetSolver`) | +| `benchmark/solvers/` | built-in baselines: a `Dummy` floor, and `random-forest.py`, the sample submission participants start from | +| `ingestion_program/` | runs `benchopt run` on a submission | +| `scoring_program/` | scores the test predictions against the labels, averages over the folds into `scores.json` | +| `phases/main/input_data/config.yaml` | the phase: benchopt run config (dataset, seed, one CV fold per repetition) | +| `local_config.yml` | the same run config for local runs, plus the solvers to run | +| `competition.yaml`, `pages/` | the Codabench competition and its pages | +| `tools/` | bundle builder, base and competition Docker images, local Docker run | +| `.agents/skills/` | the AI agent skills above | + +## What the starting kit must show + +A good challenge makes three points, each backed by evidence in the starting +kit notebook and tied to its exploratory data analysis (EDA). + +| Point | Evidence expected in the starting kit | +|---|---| +| **The data is interesting.** | Where it comes from, its license, its size in independent units (patients, sites, sessions, not rows). It is not an already-solved toy dataset. | +| **The question is interesting and this data can answer it.** | Who would use the model and for what decision. A simple baseline clearly beats the `Dummy` floor, and leaves room above it. | +| **The evaluation can answer the question.** | Why this metric and not the obvious alternative. Why this split, which unit it holds out and why it matches deployment. Checks that it does not leak. Public and private scores of the baseline agree, and the test set is big enough for leaderboard gaps to mean something. | + +The starting kit carries the full argument. The Participate page is a short +summary of it that links to the notebook. Keep both easy to read: short code +cells, every figure with a title, axis labels and a one-line takeaway, and the +notebook committed **with its outputs** so it reads on GitHub without running +it. + +## Adapting the template + +In this order, since each step builds on the previous one: + +1. **Data and question.** Pick the data and the question. Rename the + notebook to `_starting_kit.ipynb` and fill in its introduction. +2. **EDA.** Explore the data in the notebook. Look for the structure that + decides the split: groups (patients, sites, subjects), time, duplicates. +3. **Evaluation protocol.** From the EDA, choose the metric, the CV scheme + (stratified, by group, by time...), and how the test sets are cut and what + separates the public from the private one. +4. **Data in the benchmark.** Rewrite `Real.prepare()` to fetch or convert + your raw data, cut the test sets and write the private labels apart (they + become the phase `reference_data`), and `Real.get_data()` to load the + rest. Make `Simulated` return the same keys and types. +5. **Task, CV and metric.** Write the metric in + `benchmark/benchmark_utils/metric.py`. Adapt `Objective.set_data` (data + and `cv`), `get_objective` and `evaluate_result`, and set `n_repetitions` + in `phases/main/input_data/config.yaml` and `local_config.yml` to the + number of folds. +6. **Submission contract.** Adapt `CompetSolver` to what `get_objective` + returns, then the `Dummy` floor and the sample `random-forest.py`. +7. **Evaluation evidence.** Fill the notebook's evaluation section: leakage + checks, and baseline scores in CV, public and private, with their spread + over the folds. +8. **Leaderboard.** Declare the keys of `scores.json` in `competition.yaml` + (`hidden: True` for the private ones). +9. **Environment.** The default image, + `ghcr.io/x-datascience-datacamp/codabench-benchopt`, has benchopt, + pandas, scikit-learn and torch (CPU). If submissions need more, list it in + `requirements.txt`, build and push your image from `tools/Dockerfile`, and + set `docker_image` in `competition.yaml`. `codabench-benchopt-gpu` is the + CUDA variant, for a self-hosted GPU worker. +10. **Pages, dates and quotas** in `pages/` and `competition.yaml`. The + Participate page summarizes the notebook. + +## Before opening the competition + +- [ ] The starting kit covers the three points of + [What the starting kit must show](#what-the-starting-kit-must-show). +- [ ] `Dummy` and the sample submission are scored in CV, public and + private, and the sample submission clearly beats `Dummy`. +- [ ] The split has a leakage check in the notebook. +- [ ] CI is green. +- [ ] `bundle.zip` uploads on Codabench and scores the sample submission. +- [ ] No `TODO` is left in `pages/`, and no `` in + `competition.yaml`. + +## Running locally + +`local_config.yml` sets what a local run does: the dataset and its +parameters, the solvers, the seed and the number of CV folds. Both +`benchopt prepare` and `benchopt run` read it: ```bash -python create_bundle.py +pip install -r requirements.txt +benchopt test benchmark --skip-install # design checks +benchopt prepare benchmark --config local_config.yml +benchopt run benchmark --config local_config.yml # 5 CV folds +benchopt run benchmark --config local_config.yml -d Simulated # smoke test ``` -You can then upload the generated `bundle.zip` file to codabench to create the competition on this [page](https://www.codabench.org/competitions/upload/). +A command-line option overrides its key in the file, as `-d Simulated` does +here. The platform runs the phase config instead, +`phases/main/input_data/config.yaml`: keep the dataset, seed and number of +folds of the two files in sync. -## Instructions to test the bundle locally +The data goes to `$BENCHOPT_DATA_HOME` (default: `benchmark/data`). +benchopt caches `prepare`: if you delete the data or change +`BENCHOPT_DATA_HOME`, re-run it with `--force`. - -To test the ingestion program, run: +## Building and testing the bundle ```bash -python ingestion_program/ingestion.py --data-dir dev_phase/input_data/ --output-dir ingestion_res/ --submission-dir solution/ +# the bundle ships the prepared data +benchopt prepare benchmark --config local_config.yml +python tools/create_bundle.py # -> bundle.zip, to upload on Codabench ``` -To test the scoring program, run: -```bash -python scoring_program/scoring.py --reference-dir dev_phase/reference_data/ --output-dir scoring_res --prediction-dir ingestion_res/ -``` +The bundle carries the competition config, the pages, the programs, the +sample submission and the phase data, from `$BENCHOPT_DATA_HOME` (default +`benchmark/data`): +- `input_data`: the config, the benchmark and the prepared data, without the + private labels. Submissions run with it. +- `reference_data`: the private labels (the `reference/` folder written by + `prepare`). Only the scoring program reads it, with the metric of + `benchmark_utils`, which the bundle copies next to it. -### Setting up and testing the docker image +A benchmark or data change is a new upload of the phase, not an image +rebuild. It runs on Codabench's default compute workers, so you need no +server of your own. Keep the prepared data small (tens of MB), in a compact +format (Parquet, `.npz`) rather than raw files. -For convenience, a python script `tools/run_docker.py` is provided to build -the docker image, and run the ingestion and scoring programs inside the docker -container. -This script requires installing the `docker` python package, which can be done via pip: +To run the platform path locally, extract the bundle and run its programs: ```bash -pip install docker -python tools/run_docker.py +python -c "import zipfile; zipfile.ZipFile('bundle.zip').extractall('_codabench/bundle')" +python _codabench/bundle/ingestion_program/ingestion.py \ + --submission-dir _codabench/bundle/solution \ + --input-data _codabench/bundle/main_phase/input_data \ + --output-dir _codabench/ingestion +python _codabench/bundle/scoring_program/scoring.py \ + --prediction-dir _codabench/ingestion \ + --reference-dir _codabench/bundle/main_phase/reference_data \ + --output-dir _codabench/scoring +cat _codabench/scoring/scores.json ``` -You can also perform these steps manually. -You first need to build the docker image locally from the `Dockerfile` with: +`python tools/run_docker.py` does the same inside the Docker image (needs +`pip install docker`). -```bash -docker build -t docker-image tools -``` +## Large data: staging it on a self-hosted worker -To test the docker image locally, run: +Data too large for the bundle needs a +[self-hosted compute worker](https://docs.codabench.org/latest/Organizers/Running_a_benchmark/Compute-Worker-Management---Setup/) +attached to a private queue. Delete `main_phase/input_data/data/` from the +bundle and keep its `reference_data`: ingestion then reads the data from +`/app/data`, where the worker mounts it read-only. Prepare it once, with the +image, from the phase `input_data` of the bundle, so that what is staged and +what submissions run come from the same files. Then delete the staged +`reference/` folder, which submissions could read: ```bash -docker run --rm -u root \ - -v "./ingestion_program":"/app/ingestion_program" \ - -v "./dev_phase/input_data":/app/input_data \ - -v "./ingestion_res":/app/output \ - -v "./solution":/app/ingested_program \ - --name ingestion docker-image \ - python /app/ingestion_program/ingestion.py - -docker run --rm -u root \ - -v "./scoring_program":"/app/scoring_program" \ - -v "./dev_phase/reference_data":/app/input/ref \ - -v "./ingestion_res":/app/input/res \ - -v "./scoring_res":/app/output \ - --name scoring docker-image \ - python /app/scoring_program/scoring.py +docker run -e BENCHOPT_CACHE=/tmp/benchopt -v :/app/data \ + -v /main_phase/input_data:/app/input_data:ro \ + benchopt prepare /app/input_data/benchmark \ + --config /app/input_data/config.yaml ``` -### CI for the bundle +`BENCHOPT_CACHE` keeps the prepare cache off the read-only benchmark, and the +container drops it, so a new staging prepares for real. Run it a second time +with `:/app/data:ro`, as submissions see the data: a dataset that +still writes fails there rather than on every submission. + +## CI + +`.github/workflows/test.yml` lints, runs `benchopt test`, smoke-runs the +baselines on `Simulated`, then builds the bundle and runs its ingestion and +scoring end to end on `Real`, and builds the Docker image on the CPU base +image. If your data cannot be prepared in CI, run the end-to-end step on +`Simulated`, which has no private labels. -This repo defines a CI for the bundle, which build a docker image from the `tools/Dockerfile`, -and try to run `tools/setup_data.py` and then the ingestion/scoring programs. +`.github/workflows/images.yml` builds and pushes the base images +`codabench-benchopt` and `codabench-benchopt-gpu` from +`tools/Dockerfile.base` to the GitHub container registry. diff --git a/benchmark/benchmark_utils/__init__.py b/benchmark/benchmark_utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/benchmark/benchmark_utils/base_solver.py b/benchmark/benchmark_utils/base_solver.py new file mode 100644 index 0000000..1adc087 --- /dev/null +++ b/benchmark/benchmark_utils/base_solver.py @@ -0,0 +1,60 @@ +"""Submission contract. + +A submission is a **valid benchopt solver**: a folder with a ``submission.py`` +defining ``class Solver(CompetSolver)``. All its Python code lives in that +single file (benchopt loads it by path, so sibling ``.py`` files cannot be +imported); the folder may also hold non-code files (weights, configs) read +from ``meta["submission_dir"]``. Participants implement: + +- ``get_model(self, meta)`` -> model (required): build the untrained model. +- ``fit(self, model, X_train, y_train)`` (optional): train it. Defaults to + ``model.fit(X_train, y_train)``. It runs on the platform. + +The trained model must expose ``model.predict(X) -> ndarray (n_samples,)``. + +This contract is an example: design the one your challenge needs, as any +benchopt solver works (https://benchopt.github.io/stable/user_guide/). +Adapt: the arguments of ``set_objective`` / ``fit`` follow +``Objective.get_objective``, and the ``predict`` contract follows +``Objective.evaluate_result``. +""" + +import inspect +from pathlib import Path + +from benchopt import BaseSolver + + +class CompetSolver(BaseSolver): + """Base class for all submissions (and the built-in baselines). + + The competition image fixes the available packages: submissions cannot + install extra ones. + """ + + requirements = [] + + sampling_strategy = "run_once" + + def set_objective(self, X_train, y_train): + self.X_train = X_train + self.y_train = y_train + # Lets a submission load extra files (weights, configs) next to it. + submission_dir = Path(inspect.getfile(type(self))).parent + self.model = self.get_model({"submission_dir": submission_dir}) + + def run(self, _): + self.fit(self.model, self.X_train, self.y_train) + + def get_result(self): + return dict(model=self.model) + + # --- to be implemented by the submission --------------------------- + + def get_model(self, meta): + """Build and return the (untrained) model.""" + raise NotImplementedError + + def fit(self, model, X_train, y_train): + """Train the model in place.""" + model.fit(X_train, y_train) diff --git a/benchmark/benchmark_utils/metric.py b/benchmark/benchmark_utils/metric.py new file mode 100644 index 0000000..01a15a1 --- /dev/null +++ b/benchmark/benchmark_utils/metric.py @@ -0,0 +1,15 @@ +"""The competition metric, the single source of truth for the objective and +the scoring program (``tools/create_bundle.py`` ships ``benchmark_utils`` +with the scoring program). + +Adapt: ``NAME`` and ``score`` to your metric. Higher must be better, or flip +``sorting`` in ``competition.yaml``. +""" + +from sklearn.metrics import accuracy_score + +NAME = "accuracy" + + +def score(y_true, y_pred): + return float(accuracy_score(y_true, y_pred)) diff --git a/benchmark/datasets/real.py b/benchmark/datasets/real.py new file mode 100644 index 0000000..77391b1 --- /dev/null +++ b/benchmark/datasets/real.py @@ -0,0 +1,61 @@ +"""Real dataset: ``prepare`` builds the splits, ``get_data`` only loads them. + + benchopt prepare benchmark -d Real + +``prepare`` writes, under ``get_data_path("real")``, the training data and +the public test set (features + a ``target`` column), and the private test +set (features only). The private labels go to ``get_data_path("reference")``: +the bundle ships them in the phase ``reference_data``, which only the scoring +program reads, and the rest in the phase ``input_data``, where ingestion +points ``BENCHOPT_DATA_HOME``. + +Adapt: replace the scikit-learn stand-in data with a download or conversion +of your raw data, and cut the test sets the way your evaluation protocol +needs (groups, time, held-out sites...), consistently with the objective's +``cv``. Participants who can run ``prepare`` on the full raw data can rebuild +the private labels: keep their raw source out of what you publish, or rely on +the terms to protect them. +""" + +import pandas as pd +from benchopt import BaseDataset +from benchopt.config import get_data_path +from sklearn.datasets import load_breast_cancer +from sklearn.model_selection import train_test_split + + +class Dataset(BaseDataset): + + name = "Real" + + requirements = ["scikit-learn"] + + def prepare(self): + df = load_breast_cancer(as_frame=True).frame + train, test = train_test_split(df, test_size=0.4, random_state=0) + public, private = train_test_split(test, test_size=0.5, + random_state=0) + root, ref = get_data_path("real"), get_data_path("reference") + root.mkdir(parents=True, exist_ok=True) + ref.mkdir(parents=True, exist_ok=True) + train.to_csv(root / "train.csv", index=False) + public.to_csv(root / "public.csv", index=False) + private.drop(columns="target").to_csv(root / "private.csv", + index=False) + private[["target"]].to_csv(ref / "private.csv", index=False) + + def get_data(self): + root = get_data_path("real") + if not (root / "train.csv").exists(): + # Fail if the data has not been prepared. Use --force to bypass + # an eventual cache. + raise SystemExit(f"[Real] no data at {root}. Run " + "`benchopt prepare benchmark -d Real --force`.") + + train = pd.read_csv(root / "train.csv") + public = pd.read_csv(root / "public.csv") + return dict( + X=train.drop(columns="target"), y=train["target"], + X_public=public.drop(columns="target"), y_public=public["target"], + X_private=pd.read_csv(root / "private.csv"), + ) diff --git a/benchmark/datasets/simulated.py b/benchmark/datasets/simulated.py new file mode 100644 index 0000000..ad2a9b2 --- /dev/null +++ b/benchmark/datasets/simulated.py @@ -0,0 +1,33 @@ +"""Synthetic dataset: no data needed, runs anywhere (smoke tests and CI). + +It must return the same keys, types and test subsets as the real dataset, so +that CI can run the full competition pipeline on it. +""" + +import pandas as pd +from benchopt import BaseDataset +from sklearn.datasets import make_classification +from sklearn.model_selection import train_test_split + + +class Dataset(BaseDataset): + + name = "Simulated" + + requirements = ["scikit-learn"] + + parameters = {"n_samples": [500], "n_features": [5]} + test_config = {"n_samples": 100} + + def get_data(self): + seed = self.get_seed() + X, y = make_classification(n_samples=self.n_samples, + n_features=self.n_features, + random_state=seed) + X, y = pd.DataFrame(X), pd.Series(y) + X_train, X_test, y_train, y_test = train_test_split( + X, y, test_size=0.4, random_state=seed) + X_pub, X_priv, y_pub, _ = train_test_split( + X_test, y_test, test_size=0.5, random_state=seed) + return dict(X=X_train, y=y_train, X_public=X_pub, y_public=y_pub, + X_private=X_priv) diff --git a/benchmark/objective.py b/benchmark/objective.py new file mode 100644 index 0000000..a646201 --- /dev/null +++ b/benchmark/objective.py @@ -0,0 +1,67 @@ +"""Objective: what a submission is evaluated on, and how. + +This template's task is a binary classification, scored by the metric of +``benchmark_utils/metric.py`` (accuracy). The objective cross-validates the +solver on the training data, one fold per repetition (run with +``n_repetitions`` equal to the number of folds): the solver trains on the +fold's training part, and ``evaluate_result`` scores it on the held-out part +(``objective_accuracy_cv``) and on the public test set +(``objective_accuracy_public``). + +The private test set comes without labels: ``evaluate_result`` returns the +fold model's predictions on it (``objective_private_pred``), and the scoring +program scores them against the labels of the phase ``reference_data``. The +scoring program averages every score over the folds. + +Adapt: ``set_data`` / ``get_objective`` to your data, and ``cv`` to your +evaluation protocol (e.g. ``GroupKFold`` for a group split). +""" + +from benchopt import BaseObjective +from sklearn.model_selection import StratifiedKFold + +from benchmark_utils.metric import NAME, score + + +class Objective(BaseObjective): + + name = "classification-accuracy" + url = "https://github.com/x-datascience-datacamp/template_codabench" + + requirements = ["scikit-learn"] + + min_benchopt_version = "1.10.0" + + # Each solver trains once per fold (no convergence curve). + sampling_strategy = "run_once" + + def set_data(self, X, y, X_public, y_public, X_private): + self.X, self.y = X, y + self.X_public, self.y_public = X_public, y_public + self.X_private = X_private + self.cv = StratifiedKFold(n_splits=5, shuffle=True, + random_state=self.get_seed()) + + def split(self, cv_fold, X, y): + train, val = cv_fold + return X.iloc[train], X.iloc[val], y.iloc[train], y.iloc[val] + + def get_objective(self): + # The fold follows the repetition index. + X_train, self.X_val, y_train, self.y_val = self.get_split(self.X, + self.y) + return dict(X_train=X_train, y_train=y_train) + + def evaluate_result(self, model): + return { + f"{NAME}_cv": score(self.y_val, model.predict(self.X_val)), + f"{NAME}_public": score(self.y_public, + model.predict(self.X_public)), + # Scored by the scoring program against the hidden labels. + "private_pred": model.predict(self.X_private), + } + + def get_one_result(self): + # A trained trivial model, to validate the metric in ``benchopt test``. + from sklearn.dummy import DummyClassifier + return dict(model=DummyClassifier().fit(self.X, self.y)) diff --git a/benchmark/solvers/dummy.py b/benchmark/solvers/dummy.py new file mode 100644 index 0000000..dbdb652 --- /dev/null +++ b/benchmark/solvers/dummy.py @@ -0,0 +1,18 @@ +"""Floor baseline: predicts the most frequent class. + +Any real model should beat it. Keep one such floor in every competition. +""" + +from sklearn.dummy import DummyClassifier + +from benchmark_utils.base_solver import CompetSolver + + +class Solver(CompetSolver): + + name = "Dummy" + + requirements = ["scikit-learn"] + + def get_model(self, meta): + return DummyClassifier() diff --git a/benchmark/solvers/random-forest.py b/benchmark/solvers/random-forest.py new file mode 100644 index 0000000..53e4aac --- /dev/null +++ b/benchmark/solvers/random-forest.py @@ -0,0 +1,26 @@ +"""Sample submission: the starting point participants copy and improve. + +A submission is a benchopt solver: a ``submission.py`` defining +``class Solver(CompetSolver)`` with a ``get_model`` method (and optionally +``fit``). See ``benchmark/benchmark_utils/base_solver.py`` for the contract. +The bundle ships this file as the Codabench sample submission. + +Copy it to a folder of your own as ``submission.py`` and run it exactly as +the platform does, with the dataset, seed and folds of ``local_config.yml``:: + + benchopt prepare benchmark --config local_config.yml + benchopt run benchmark --config local_config.yml \ + -s my_submission/submission.py +""" + +from sklearn.ensemble import RandomForestClassifier + +from benchmark_utils.base_solver import CompetSolver + + +class Solver(CompetSolver): + + name = "RandomForest" + + def get_model(self, meta): + return RandomForestClassifier(random_state=0) diff --git a/benchmark/test_config.py b/benchmark/test_config.py new file mode 100644 index 0000000..5938e3f --- /dev/null +++ b/benchmark/test_config.py @@ -0,0 +1,17 @@ +"""Hooks for ``benchopt test`` (see benchopt's test_config mechanism).""" + +import pytest + +# The real dataset needs prepared data files, which CI does not carry; +# ``Simulated`` covers the no-data smoke test. +REAL_DATASETS = ("real",) + + +def check_test_dataset_install(dataset_class): + if dataset_class.name.lower() in REAL_DATASETS: + pytest.skip("real data is staged separately, not available in CI") + + +def check_test_dataset_get_data(dataset_class): + if dataset_class.name.lower() in REAL_DATASETS: + pytest.skip("real data is staged separately, not available in CI") diff --git a/competition.yaml b/competition.yaml index 3a1e4de..4842dcf 100755 --- a/competition.yaml +++ b/competition.yaml @@ -1,60 +1,90 @@ version: 2 -title: Templat competition - Dummy classification -description: Dummy classification task +title: "Template competition: dummy classification" +description: > + Template for a benchopt-powered Codabench competition: a binary + classification task scored by accuracy. Submissions are code (a benchopt + solver) that trains on the platform. The public leaderboard column scores + a public test set; the final ranking uses a hidden private test set. image: logo.png -registration_auto_approve: False # if True, do not require approval from admin to join the comp +registration_auto_approve: False + +# The image submissions run in: the base image, or your own built from +# tools/Dockerfile when requirements.txt adds packages. The benchmark and the +# prepared data ship in the phase input_data. +docker_image: ghcr.io/x-datascience-datacamp/codabench-benchopt:latest + +# Only the leaderboard metrics are exposed. +enable_detailed_results: False +show_detailed_results_in_submission_panel: False +show_detailed_results_in_leaderboard: False terms: pages/terms.md pages: - title: Participation file: pages/participate.md - - title: Seed - file: pages/seed.md - title: Timeline file: pages/timeline.md tasks: - index: 0 - name: Developement Task - description: 'Tune models with training data, test against examples contained in public test data' - input_data: dev_phase/input_data/ - reference_data: dev_phase/reference_data/ + name: Classification + description: > + The ingestion program runs the benchopt benchmark on your submission + (training on the platform); scoring parses the results. + input_data: main_phase/input_data/ + reference_data: main_phase/reference_data/ ingestion_program: ingestion_program/ scoring_program: scoring_program/ solutions: - index: 0 tasks: - - 0 + - 0 path: solution/ - +# Dates are UTC+0, in the documented YYYY-MM-DD HH:MM:SS format. phases: - - name: Development Phase - description: 'Development phase: tune your models.' - start: 10-07-2025 - end: 03-31-2026 + - index: 0 + name: Competition + description: > + Build, train and submit your model. The public column scores the public + test set; the final ranking uses the hidden private test set. + start: 2026-11-02 00:00:00 + end: 2027-03-31 23:59:59 + execution_time_limit: 600 + max_submissions_per_day: 5 + # Keep the test predictions and the hidden private metric private. + hide_prediction_output: True + hide_score_output: True tasks: - 0 +# Column keys are those of scores.json (scoring program), averaged over the +# CV folds: the objective's metrics (_cv, _public), +# _ for each hidden test set of the reference data, and +# train_time (mean per fold) and duration. leaderboards: - title: Results key: main columns: - - title: Test Accuracy - key: test + - title: Accuracy (public) + key: accuracy_public index: 0 - sorting: asc - - title: Private Test Accuracy - key: private_test + sorting: desc + - title: Accuracy (private) + key: accuracy_private index: 1 - sorting: asc + sorting: desc hidden: True - - title: Train time - key: train_time + - title: Accuracy (CV) + key: accuracy_cv index: 2 sorting: desc - - title: Test time - key: test_time + - title: Train time (s) + key: train_time index: 3 - sorting: desc + sorting: asc + - title: Duration (s) + key: duration + index: 4 + sorting: asc diff --git a/ingestion_program/bench_utils/__init__.py b/ingestion_program/bench_utils/__init__.py deleted file mode 100644 index 8e19e63..0000000 --- a/ingestion_program/bench_utils/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# A module for the benchmark, to provide utilities usable in both the -# ingestion and the submission programs. -# -# Note that the import cannot be done at the top level of -# the ingestion program - -N_SAMPLES = 1000 diff --git a/ingestion_program/ingestion.py b/ingestion_program/ingestion.py index f150b05..1bdd5d6 100755 --- a/ingestion_program/ingestion.py +++ b/ingestion_program/ingestion.py @@ -1,92 +1,71 @@ -import json -import sys -import time +"""Ingestion program for the competition. + +A thin wrapper around ``benchopt run``. A submission is a benchopt solver: +a single ``submission.py`` (a ``CompetSolver``) holding all its Python +code, plus optional non-code files (weights, configs) it reads from +``meta["submission_dir"]``. This program runs the benchmark shipped in the +phase ``input_data/benchmark`` on that file, loaded by path:: + + benchopt run /benchmark --config /config.yaml \ + -s /submission.py --no-cache --no-plot \ + --output /results.parquet + +The phase ``config.yaml`` is a native benchopt run config (``dataset``, +``seed``, ``n_repetitions``: one cross-validation fold per repetition). The +scoring program scores the test predictions of ``results.parquet``. The +prepared data comes with the phase, in ``input_data/data``. Without it, the +run uses the image's $BENCHOPT_DATA_HOME (/app/data, where a self-hosted +worker mounts the staged data read-only). $BENCHOPT_DEBUG ensures any solver +error aborts the run. +""" + +import os from pathlib import Path -import pandas as pd +os.environ["BENCHOPT_DEBUG"] = "true" +import argparse # noqa: E402 +import json # noqa: E402 +import subprocess # noqa: E402 +import time # noqa: E402 -EVAL_SETS = ["test", "private_test"] +def main(submission_dir, output_dir, input_dir): + submission = submission_dir / "submission.py" + if not submission.is_file(): + raise SystemExit(f"No submission.py found in {submission_dir}.") + benchmark_dir = input_dir / "benchmark" + if not (benchmark_dir / "objective.py").is_file(): + raise SystemExit(f"No benchopt benchmark found in {benchmark_dir}.") -def evaluate_model(model, X_test): + if (input_dir / "data").is_dir(): + os.environ["BENCHOPT_DATA_HOME"] = str((input_dir / "data").resolve()) - y_pred = model.predict(X_test) - return pd.DataFrame(y_pred) - - -def get_train_data(data_dir): - data_dir = Path(data_dir) - training_dir = data_dir / "train" - X_train = pd.read_csv(training_dir / "train_features.csv") - y_train = pd.read_csv(training_dir / "train_labels.csv") - return X_train, y_train - - -def main(data_dir, output_dir): - # Here, you can import info from the submission module, to evaluate the - # submission - from submission import get_model - - X_train, y_train = get_train_data(data_dir) - - print("Training the model") - - model = get_model() - - start = time.time() - model.fit(X_train, y_train) - train_time = time.time() - start - print("-" * 10) - print("Evaluate the model") + output_dir.mkdir(parents=True, exist_ok=True) + cmd = [ + "benchopt", "run", str(benchmark_dir), "-s", str(submission), + "--no-cache", "--no-plot", "--no-html", "--no-display", + "--output", str(output_dir / "results.parquet"), + "--config", str(input_dir / "config.yaml"), + ] + print(f"[ingestion] evaluating {submission}", flush=True) start = time.time() - res = {} - for eval_set in EVAL_SETS: - X_test = pd.read_csv(data_dir / eval_set / f"{eval_set}_features.csv") - res[eval_set] = evaluate_model(model, X_test) - test_time = time.time() - start - print("-" * 10) - duration = train_time + test_time - print(f"Completed Prediction. Total duration: {duration}") + subprocess.run(cmd, check=True) - # Write output files - output_dir.mkdir(parents=True, exist_ok=True) - with open(output_dir / "metadata.json", "w+") as f: - json.dump(dict(train_time=train_time, test_time=test_time), f) - for eval_set in EVAL_SETS: - filepath = output_dir / f"{eval_set}_predictions.csv" - res[eval_set].to_csv(filepath, index=False) - print() - print("Ingestion Program finished. Moving on to scoring") + (output_dir / "metadata.json").write_text( + json.dumps({"duration": time.time() - start})) if __name__ == "__main__": - import argparse - - parser = argparse.ArgumentParser( - description="Ingestion program for codabench" - ) - parser.add_argument( - "--data-dir", - type=str, - default="/app/input_data", - help="", - ) - parser.add_argument( - "--output-dir", - type=str, - default="/app/output", - help="", - ) - parser.add_argument( - "--submission-dir", - type=str, - default="/app/ingested_program", - help="", - ) - + parser = argparse.ArgumentParser(description="Competition ingestion") + parser.add_argument("--submission-dir", default="/app/ingested_program") + parser.add_argument("--output-dir", default="/app/output") + parser.add_argument("--input-data", default="/app/input_data", + help="Phase dir: config.yaml, benchmark/ and data/") args = parser.parse_args() - sys.path.append(args.submission_dir) - sys.path.append(Path(__file__).parent.resolve()) - main(Path(args.data_dir), Path(args.output_dir)) + main( + Path(args.submission_dir), + Path(args.output_dir), + Path(args.input_data), + ) diff --git a/local_config.yml b/local_config.yml new file mode 100644 index 0000000..67d1dec --- /dev/null +++ b/local_config.yml @@ -0,0 +1,18 @@ +# Local run config, for both commands: +# +# benchopt prepare benchmark --config local_config.yml +# benchopt run benchmark --config local_config.yml +# +# `prepare` reads only `dataset`. A command-line option overrides its key +# here, e.g. `-d Simulated` for a quick smoke test. The platform runs the +# phase config, phases/main/input_data/config.yaml: keep the two in sync. +dataset: + - Real +solver: + - Dummy + - RandomForest + # - my_submission/submission.py +seed: 42 +# One cross-validation fold per repetition: match the objective's n_splits. +n_repetitions: 5 +no_timeout: true diff --git a/pages/participate.md b/pages/participate.md index 4d5427b..8ef6283 100755 --- a/pages/participate.md +++ b/pages/participate.md @@ -1,10 +1,80 @@ # How to participate -You should submit an untrained model in a python file `model.py` which contains -your `class Model`, which will be imported, trained, and tested on Codalab. +Each section below is a short summary. The +[starting kit](TODO-link-to-the-starting-kit-notebook) gives the full argument, +with the data analysis behind each choice. -See the "Seed" page for the outline of a `Model` class, with the expected -function names. +## The task -See the "Timeline" page for additional information about the phases of this -competition +**TODO:** one paragraph: the data, what is predicted from what, and why it +matters. +In this template: a binary classification of tabular samples. + +## The metric + +**TODO:** the metric, whether higher or lower is better, and why it fits +the use case. In this template: **accuracy** (higher is better). + +## The split + +**TODO:** the unit held out (rows, patients, sites, time periods) and the +generalization it measures. If the test sets differ from the training set on +purpose (new sites, later dates), say so. + +Your model is trained and scored with 5-fold cross-validation on the +training data, then each fold's model predicts the test sets. Every score is +averaged over the 5 folds. + +- **CV column**: the cross-validation score. +- **Public column** (live feedback): a public test set. +- **Private / final ranking** (hidden): a private test set. Do not overfit + the public column. + +## What you submit + +A single **`submission.py`** defining `class Solver(CompetSolver)`. All your +Python code must live in this one file: the platform loads it on its own, so +it cannot import other `.py` files you ship. You may add non-code files next +to it (model weights, configs) and read them from `meta["submission_dir"]`. + +```python +from benchmark_utils.base_solver import CompetSolver + + +class Solver(CompetSolver): + name = "submission" + + def get_model(self, meta): + # build your (untrained) model + ... + + def fit(self, model, X_train, y_train): + # optional: train it (default: model.fit(X_train, y_train)) + ... +``` + +Your trained model must expose `predict(X) -> ndarray (n_samples,)`. The +platform **trains your code**, once per fold, then evaluates it. Copy +`benchmark/solvers/random-forest.py`, a working baseline, to +`my_submission/submission.py`. + +## Run it locally, same code as the server + +`local_config.yml` sets the dataset, the solvers, the seed and the 5 folds +of a local run. Add your `my_submission/submission.py` to its `solver` list, +then: + +```bash +pip install -r requirements.txt +benchopt prepare benchmark --config local_config.yml # builds the data +benchopt run benchmark --config local_config.yml +``` + +A command-line option overrides the file, e.g. `-s my_submission/submission.py` +runs your submission alone. + +The cross-validation and public scores you get locally +(`objective_accuracy_cv` and `objective_accuracy_public`, averaged over the 5 +repetitions) are the CV and public columns of the leaderboard. The benchmark +you run *is* the benchmark the server runs. Select your models on the CV +score rather than on the public one. diff --git a/pages/seed.md b/pages/seed.md deleted file mode 100644 index 9b15f6a..0000000 --- a/pages/seed.md +++ /dev/null @@ -1,21 +0,0 @@ -# Seed: - -``` -class Model: - def fit(self, X_train, y_train): - """ - This should handle the logic of training your model - :param X_train: np.array of training data - :param y_train: np.array of the same length as X_train. Contains classifications of X_train - """ - pass - - def predict(self, X_test): - """ - This should handle making predictions with a trained model - :param X_test: np.array of testing data - :return: np.array of the same length as X_test containing predictions to each point in X_test - """ - pass - -``` \ No newline at end of file diff --git a/pages/terms.md b/pages/terms.md index 0d69023..0ab95a0 100755 --- a/pages/terms.md +++ b/pages/terms.md @@ -1,18 +1,25 @@ # Terms and Conditions -## Lorem Ipsum +By participating in this competition you agree to the following. -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. -Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure -dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non -proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +1. **Submissions must be your own work.** You may use public libraries and + pretrained models, but the training and modelling code you submit must be + authored by your team. +2. **No attempt to access the hidden data.** The private test set is used only + for the final ranking. Any attempt to read, exfiltrate or reverse-engineer + it is cheating and disqualifies the team. +3. **Fair use of the platform.** Respect the per-day submission limit and the + execution-time budget. Do not attempt to interfere with other participants' + runs or the evaluation infrastructure. +4. **Reproducibility.** The organizers may re-run any submission to verify its + leaderboard score. A submission that cannot be reproduced may be removed. +5. **Data usage.** The data are provided for use within this competition + only. -## Sed ut perspiciatis + +In the DataCamp course, cheating also results in a grade of 0 for the course +and in failing the master. + -Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae -ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit -aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam -est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore -et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, -nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae -consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? +The organizers may adjust these rules and will announce any change on the +competition pages. diff --git a/pages/timeline.md b/pages/timeline.md index 4e613bf..f1a24af 100644 --- a/pages/timeline.md +++ b/pages/timeline.md @@ -1,11 +1,11 @@ # Timeline -## Development phase -This phase should be used to tune your models, testing against a small -set of testing data +The competition runs as a **single phase**. The public leaderboard column +gives live feedback, while the hidden private column decides the final +ranking. Up to **5 submissions per day**. -## Final phase -Resubmit your preferred submission from the development phase to test -against a new set of testing data. Your model will be trained against -the same set of training data as in the development phase. You may only -make one submission to this phase, so choose wisely. +- **Start:** **TODO** +- **End:** **TODO** + +The final ranking is taken from the private (hidden) score at the close of the +phase. diff --git a/phases/main/input_data/config.yaml b/phases/main/input_data/config.yaml new file mode 100644 index 0000000..d181d23 --- /dev/null +++ b/phases/main/input_data/config.yaml @@ -0,0 +1,8 @@ +# Phase config: a native `benchopt run --config` file. local_config.yml at +# the repository root mirrors it for local runs: keep the two in sync. +dataset: + - Real +seed: 42 +# One cross-validation fold per repetition: match the objective's n_splits. +n_repetitions: 5 +no_timeout: true diff --git a/phases/reference_data/README.md b/phases/reference_data/README.md new file mode 100644 index 0000000..b9544b2 --- /dev/null +++ b/phases/reference_data/README.md @@ -0,0 +1,7 @@ +# Reference data + +The hidden test labels: one `.csv` with a `target` column per test +set whose labels submissions must not see (here, `private`). `benchopt +prepare` writes them to `$BENCHOPT_DATA_HOME/reference`, and +`tools/create_bundle.py` ships them here. Only the scoring program reads +them. diff --git a/requirements.txt b/requirements.txt index fda4dd6..3eda32c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,8 @@ +# Dependencies of the competition: the ingestion and scoring programs, the +# benchmark and every submission. No install happens at submission time, so +# this is the participants' dependency contract. The base image +# (tools/Dockerfile.base) already has these and torch: add what your +# challenge needs, and tools/Dockerfile installs it on top. +benchopt>=1.10 pandas scikit-learn diff --git a/scoring_program/scoring.py b/scoring_program/scoring.py index 701f78f..31fa327 100755 --- a/scoring_program/scoring.py +++ b/scoring_program/scoring.py @@ -1,72 +1,65 @@ +"""Scoring program for the competition. + +The ingestion run cross-validates the submission, one fold per repetition. +Each row of ``results.parquet`` holds the fold's metrics (``objective_*``) +and its predictions on each hidden test set (``objective__pred``). +This program scores these predictions against the labels of the phase +``reference_data`` (one ``.csv`` with a ``target`` column per hidden +test set), and averages every score over the folds into ``scores.json``: +``accuracy_cv``, ``accuracy_public``, ``accuracy_private``, ``train_time`` +and ``duration``. + +The metric is the benchmark's ``benchmark_utils/metric.py``, which +``tools/create_bundle.py`` copies next to this program. +""" + import json from pathlib import Path +import numpy as np import pandas as pd -EVAL_SETS = ["test", "private_test"] +from benchmark_utils.metric import NAME, score -def compute_accuracy(predictions, targets): - # Make sure there is no NaN, as pandas ignores them in mean computation - predictions = predictions.fillna(-10).values - # Return mean of correct predictions - return (predictions == targets.values).mean() +def main(prediction_dir, reference_dir, output_dir): + from benchopt.results import read_results + df = read_results(prediction_dir / "results.parquet") -def main(reference_dir, prediction_dir, output_dir): scores = {} - for eval_set in EVAL_SETS: - print(f'Scoring {eval_set}') + for ref in sorted(reference_dir.glob("*.csv")): + y_true = pd.read_csv(ref)["target"] + scores[f"{NAME}_{ref.stem}"] = np.mean( + [score(y_true, pred) + for pred in df[f"objective_{ref.stem}_pred"]]) + metrics = df.select_dtypes("number").filter(regex="^objective_") + for col, value in metrics.mean().items(): + scores[col.removeprefix("objective_")] = value + if not scores or np.isnan(list(scores.values())).any(): + raise SystemExit(f"[scoring] missing or NaN scores: {list(scores)}") - predictions = pd.read_csv( - prediction_dir / f'{eval_set}_predictions.csv' - ) - targets = pd.read_csv( - reference_dir / f'{eval_set}_labels.csv' - ) + # benchopt times the solver's run (training), ingestion the whole run. + scores["train_time"] = df["time"].mean() + scores["duration"] = json.loads( + (prediction_dir / "metadata.json").read_text())["duration"] - scores[eval_set] = float(compute_accuracy(predictions, targets)) - - # Add train and test times in the score - json_durations = (prediction_dir / 'metadata.json').read_text() - durations = json.loads(json_durations) - scores.update(**durations) - print(scores) - - # Write output scores output_dir.mkdir(parents=True, exist_ok=True) - (output_dir / 'scores.json').write_text(json.dumps(scores)) + (output_dir / "scores.json").write_text( + json.dumps({k: float(v) for k, v in scores.items()})) + # Keys only: the log is shown to the submitter, values include hidden + # private metrics. + print(f"[scoring] wrote {', '.join(scores)} to scores.json") if __name__ == "__main__": import argparse - parser = argparse.ArgumentParser( - description="Scoring program for codabench" - ) - parser.add_argument( - "--reference-dir", - type=str, - default="/app/input/ref", - help="", - ) - parser.add_argument( - "--prediction-dir", - type=str, - default="/app/input/res", - help="", - ) - parser.add_argument( - "--output-dir", - type=str, - default="/app/output", - help="", - ) - + parser = argparse.ArgumentParser(description="Competition scoring") + parser.add_argument("--prediction-dir", default="/app/input/res") + parser.add_argument("--reference-dir", default="/app/input/ref") + parser.add_argument("--output-dir", default="/app/output") args = parser.parse_args() - main( - Path(args.reference_dir), - Path(args.prediction_dir), - Path(args.output_dir) - ) + main(Path(args.prediction_dir), Path(args.reference_dir), + Path(args.output_dir)) diff --git a/solution/submission.py b/solution/submission.py deleted file mode 100644 index a8076b0..0000000 --- a/solution/submission.py +++ /dev/null @@ -1,7 +0,0 @@ -from sklearn.ensemble import RandomForestClassifier - - -# The submission here should simply be a function that returns a model -# compatible with scikit-learn API -def get_model(): - return RandomForestClassifier() diff --git a/template_starting_kit.ipynb b/template_starting_kit.ipynb index 7167a3a..d809290 100644 --- a/template_starting_kit.ipynb +++ b/template_starting_kit.ipynb @@ -11,158 +11,853 @@ " \n", "\n", "\n", - "# Template Kit for Cadabench challenge in the Datacamp\n", + "# <Challenge name>: starting kit\n", "\n", - " Thomas Moreau (Inria)
\n", - " Pedro Rodrigues (Inria) " + "<Team members (affiliation)>\n", + "\n", + "> **How to fill this template.** Replace every *italic prompt* and ``\n", + "> by your own content. The code cells run on the template's stand-in data\n", + "> (breast cancer, binary classification): adapt them to yours. Commit the\n", + "> notebook **executed, with its outputs**, so it reads on GitHub." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Introduction\n", + "## TL;DR\n", "\n", - "Describe the challenge, in particular:\n", + "| | |\n", + "|---|---|\n", + "| **Task** | *<one line: what is predicted from what>* |\n", + "| **Data** | *<source, size in independent units (patients, sites...)>* |\n", + "| **Metric** | *<metric, higher/lower is better>* |\n", + "| **Evaluation** | *<CV scheme and folds, test sets: unit held out, public/private sizes>* |\n", + "| **Baselines** | *<Dummy floor score>* vs *<sample submission score>* (CV and public) |" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Data and question\n", + "\n", + "*Answer each point in a few sentences.*\n", "\n", - "- Where the data comes from?\n", - "- What is the task this challenge aims to solve?\n", - "- Why does it matter?" + "- **Where does the data come from?** *Who collected it, how, and under which\n", + " license. Can it be redistributed?*\n", + "- **What is the question?** *What is predicted, from which inputs.*\n", + "- **Why does it matter?** *Who would use such a model, and for which decision.\n", + " What would a good score change?*\n", + "- **Can this data answer it?** *Point to the EDA and baseline evidence below.*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Exploratory data analysis\n", + "## 2. Exploratory data analysis\n", "\n", - "The goal of this section is to show what's in the data, and how to play with it.\n", - "This is the first set in any data science project, and here, you should give a sense of the data the participants will be working with.\n", + "*Show what is in the data, and the structure that decides the evaluation:\n", + "groups (patients, sites, subjects), time, duplicates, class balance. Give\n", + "every figure a title and axis labels, and follow it with a one-line\n", + "takeaway.*\n", "\n", - "You can first load and describe the data, and then show some interesting properties of it." + "The data is built by the benchmark's `Real` dataset: `benchopt prepare`\n", + "writes it to `benchmark/data/real`, and the private labels to\n", + "`benchmark/data/reference` (re-run with `--force` if you deleted them). We\n", + "load exactly what the solvers receive: the training data `X, y`, the public\n", + "test set `X_public, y_public`, and the private test set `X_private` without\n", + "its labels." ] }, { "cell_type": "code", "execution_count": 1, - "metadata": {}, - "outputs": [], + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:06.770751Z", + "iopub.status.busy": "2026-11-04T05:40:06.770200Z", + "iopub.status.idle": "2026-11-04T05:40:21.914814Z", + "shell.execute_reply": "2026-11-04T05:40:21.912913Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Preparing datasets for benchmark 'template_codabench'\r\n", + "No seed was specified. Selected global seed: 0\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Preparing Real ... done\u001b[1;36m (cached)\u001b[0m\r\n", + "Summary: 1/1 datasets ready.\r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "train: (341, 30) public: (114, 30) private: (114, 30)\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
mean radiusmean texturemean perimetermean areamean smoothnessmean compactnessmean concavitymean concave pointsmean symmetrymean fractal dimension...worst radiusworst textureworst perimeterworst areaworst smoothnessworst compactnessworst concavityworst concave pointsworst symmetryworst fractal dimension
011.2029.3770.67386.00.074490.035580.000000.000000.10600.05502...11.9238.3075.19439.60.092670.054940.00000.000000.15660.05905
119.8122.15130.001260.00.098310.102700.147900.094980.15820.05395...27.3230.88186.802398.00.151200.315000.53720.238800.27680.07615
216.3015.70104.70819.80.094270.067120.055260.045630.17110.05657...17.3217.76109.80928.20.135400.136100.19470.135700.23000.07230
312.8613.3282.82504.80.113400.088340.038000.034000.15430.06476...14.0421.0892.80599.50.154700.223100.17910.115500.23820.08553
413.6416.3487.21571.80.076850.060590.018570.017230.13530.05953...14.6723.1996.08656.70.108900.158200.10500.085860.23460.08025
\n", + "

5 rows × 30 columns

\n", + "
" + ], + "text/plain": [ + " mean radius mean texture mean perimeter mean area mean smoothness \\\n", + "0 11.20 29.37 70.67 386.0 0.07449 \n", + "1 19.81 22.15 130.00 1260.0 0.09831 \n", + "2 16.30 15.70 104.70 819.8 0.09427 \n", + "3 12.86 13.32 82.82 504.8 0.11340 \n", + "4 13.64 16.34 87.21 571.8 0.07685 \n", + "\n", + " mean compactness mean concavity mean concave points mean symmetry \\\n", + "0 0.03558 0.00000 0.00000 0.1060 \n", + "1 0.10270 0.14790 0.09498 0.1582 \n", + "2 0.06712 0.05526 0.04563 0.1711 \n", + "3 0.08834 0.03800 0.03400 0.1543 \n", + "4 0.06059 0.01857 0.01723 0.1353 \n", + "\n", + " mean fractal dimension ... worst radius worst texture worst perimeter \\\n", + "0 0.05502 ... 11.92 38.30 75.19 \n", + "1 0.05395 ... 27.32 30.88 186.80 \n", + "2 0.05657 ... 17.32 17.76 109.80 \n", + "3 0.06476 ... 14.04 21.08 92.80 \n", + "4 0.05953 ... 14.67 23.19 96.08 \n", + "\n", + " worst area worst smoothness worst compactness worst concavity \\\n", + "0 439.6 0.09267 0.05494 0.0000 \n", + "1 2398.0 0.15120 0.31500 0.5372 \n", + "2 928.2 0.13540 0.13610 0.1947 \n", + "3 599.5 0.15470 0.22310 0.1791 \n", + "4 656.7 0.10890 0.15820 0.1050 \n", + "\n", + " worst concave points worst symmetry worst fractal dimension \n", + "0 0.00000 0.1566 0.05905 \n", + "1 0.23880 0.2768 0.07615 \n", + "2 0.13570 0.2300 0.07230 \n", + "3 0.11550 0.2382 0.08553 \n", + "4 0.08586 0.2346 0.08025 \n", + "\n", + "[5 rows x 30 columns]" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "%matplotlib inline\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", - "pd.set_option('display.max_columns', None)\n", + "from benchopt.benchmark import Benchmark\n", + "pd.set_option('display.max_columns', 20)\n", + "\n", + "!benchopt prepare benchmark --config local_config.yml\n", "\n", - "# Load the data\n", - "from ingestion_program.ingestion import get_train_data\n", - "X_df, y = get_train_data(\"dev_phase/input_data\")" + "(Real, params), = Benchmark('benchmark').check_dataset_patterns(['Real'])\n", + "data = Real.get_instance(**params).get_data()\n", + "X, y = data['X'], data['y']\n", + "X_test = {'public': data['X_public'], 'private': data['X_private']}\n", + "y_test = {'public': data['y_public'],\n", + " 'private': pd.read_csv('benchmark/data/reference/private.csv')['target']}\n", + "print(f\"train: {X.shape}\", *(f\"{k}: {Xt.shape}\" for k, Xt in X_test.items()))\n", + "X.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Challenge evaluation\n", - "\n", - "A particularly important point in a challenge is to describe how it is evaluated. This is the section where you should describe the metric that will be used to evaluate the participants' submissions, as well as your evaluation strategy, in particular if there is some complexity in the way the data should be split to ensure valid results." + "### Target and features" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:21.923126Z", + "iopub.status.busy": "2026-11-04T05:40:21.922802Z", + "iopub.status.idle": "2026-11-04T05:40:21.935603Z", + "shell.execute_reply": "2026-11-04T05:40:21.933184Z" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
trainpublicprivate
target
10.6217010.6754390.596491
00.3782990.3245610.403509
\n", + "
" + ], + "text/plain": [ + " train public private\n", + "target \n", + "1 0.621701 0.675439 0.596491\n", + "0 0.378299 0.324561 0.403509" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.DataFrame({name: labels.value_counts(normalize=True)\n", + " for name, labels in {'train': y, **y_test}.items()})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Submission format\n", + "*Takeaway: e.g. \"the classes are imbalanced (63/37) and the balance is the\n", + "same in every split\".*" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:21.940455Z", + "iopub.status.busy": "2026-11-04T05:40:21.940216Z", + "iopub.status.idle": "2026-11-04T05:40:22.878525Z", + "shell.execute_reply": "2026-11-04T05:40:22.876850Z" + } + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAABKUAAAFUCAYAAAD1S49QAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjExLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlcelbwAAAAlwSFlzAAAPYQAAD2EBqD+naQAAhIVJREFUeJzs3XdYFNf7NvCbpfemFAFFFHuPvRsbEcUWe++m2EvEEktMMBqNGiwpSmL8xh4Llth7L6jYGypFpEnvcN4/fJmf6y5Nl90F7s917aVzzpmZZxaY2Xn2nDM6QggBIiIiIiIiIiIiNZJpOgAiIiIiIiIiIip9mJQiIiIiIiIiIiK1Y1KKiIiIiIiIiIjUjkkpIiIiIiIiIiJSOyaliIiIiIiIiIhI7ZiUIiIiIiIiIiIitWNSioiIiIiIiIiI1I5JKSIiIiIiIiIiUjsmpYiIiIiIiIiISO2Y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+BCvXr2ShsP9+uuv2Lt3L27duoUaNWrg1q1baN26NaytraV1tm3bhiVLluDcuXOoUaMG0tLSMGzYMIwePRoHDx5E165d8c033ygM37t69SpGjBiR5zGNGzcOEyZMAABcv34djRs3lnuiXvPmzREbG4unT5+iatWqH/CuERERERERFQ0mpYiI/r/U1FSEhYUhOTkZn376KY4dO6aQlFq4cKHc/EwbN27EyJEjUaNGDQBA3bp1MXToUPj7+0ttVq5ciV69ekEmk+H+/fsQQqBXr14YMGAAUlNTc53vqVGjRoWaYyo6Ohrly5eXK7O1tQXwdnghk1JERERERKRNmJQiolIvPT0d48aNwz///AN7e3tYWFggOjoaZcuWVWhbsWJFueWnT59i/PjxcmXVq1eXS0rdv38fISEhOHXqlEK7qKgoODs7K40rKSkJQUFBecZuZ2cHOzs7AICenh7S09Pl6nOGIOrr6+e5HSIiIiIiInVjUoqISr21a9fi9OnTePbsGZycnAAAixYtwvbt2xXa6urqyi2bmJggJSVFruz9ZQMDA0yYMAEzZ84sVFz37t0r1PA9FxcXvHr1Sq4+Z9nFxaVQ+yYiIiIiIipqTEoRUamSM1QuIyNDKnvw4AEaN24sJaQA4Pjx4wXaXr169XDq1ClpcnEAOH36tFybli1bYseOHZgxY4bcfE/p6ekwMDCQ4no3JqDww/fatWuHadOmITExEWZmZgCAAwcOoGrVqnB0dCzwdoiIiIiIiNSBT98jolKlfPnyMDExwaZNmxAYGIjg4GC0aNECBw4cwNatW3H+/HmMGzcOFy5cKND2vL29sWfPHixatAgXL17EvHnzcPjwYbnk0+LFi/H48WP07t0bR48exenTp7FkyRJ06dJFalO9enU8f/4cBw8exJ07dxATE1PoYxs2bBicnJzQp08fnDp1CqtWrcLvv/+ORYsWFXpbRERERERERY1JKSIqVUxMTPDPP//g+PHjGDRoEH7++WcMGTIE3333HdasWYNp06bBzMwMK1asgLu7u9x6NWvWVBi+16xZM+zZswdnz57FjBkzkJiYiHnz5sHY2FhqU6NGDQQEBMDR0RFz587FwoULkZiYiG3btklt2rRpg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peukpaUhLS1NWo6Pj1fdQRAREREREdFb/pPyb9NtVdHHQURaQat7SpmYmOD7779HmTJlIJPJ0KFDB3h7e2P9+vUQQihdR0dHB1lZWXJl2dnZyM7Ohkym/HB9fHxgaWkpvVxcXFR+LERERERERERE9H+0uqeUMu7u7khKSsLr16/h4OCgUF+uXDkcO3ZMruz169cAAEdHR6Xb9Pb2xtSpU6Xl+Ph4JqaIiIi0TUG+XSciIiKiYkOre0op6w119epVmJmZwdbWVmoTFRUlDb9r3bo1Xr58icePH0vrHDlyBPr6+mjatKnS/RgaGsLCwkLuRURERERERERERUejPaViY2ORmZmJ1NRUZGZmIioqCgBQpkwZAMCqVasQGxsLLy8vWFlZ4eDBg1i+fDm8vb2hr68PAIiLi0PZsmXh5+eH4cOHo3379mjSpAlGjBiBNWvWICYmBnPmzMH48eNhY2OjsWMlIiIiIiIiIqL/o9GkVLdu3XD//n1puVq1agCAFy9ewNTUFOPHj8cvv/yC8ePHIzIyEm5ubvjrr7/Qt29faR2ZTAZbW1sYGRlJy/7+/pg5cya8vLxgaGiIUaNG4dtvv1XvwRERERERERERUa40mpQ6e/ZsnvVGRkaYMWMGZsyYkWsbCwsLqYdVjpyeU0REREREREREpJ20ek4pIiIiIiIiIiIqmZiUIiIiIiIiIiIitWNSioiIiIiIiIiI1I5JKSIiIiIiIiIiUjsmpYiIiIiIiIiISO2YlCIiIiIiIiIiIrXT03QARERERFrLf1LB2nVbVbRxEBEREZVA7ClFRERERERERERqx6QUERERERERERGpHZNSRERERERERESkdkxKERERERERERGR2jEpRUREREREREREasekFBERERERERERqR2TUkREREREREREpHZMShERERERERERkdoxKUVERERERERERGqnp+kAiIiIiEoS738DC9TOp1ftIo6EiIiISLuxpxQREREREREREakdk1JERERERERERKR2TEoREREREREREZHaacWcUlFRUcjOzoadnV2ubd68eQNra+t8tyWEQGhoqEK5jY0NTExMPipOIiIiIiIiIiJSDY32lNq1axc6dOgAR0dHdOnSRaE+LCwMX3/9NWxsbODm5gZzc3N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iIiIiIiIqI8FIueUqGhoTh8+DD+/PNPhbrs7Gw8evQIjo6OsLS0REZGBvT19eXanDlzBlZWVihbtqzS7fOJGURERERERERE6lUsklJ//vknLCws8PnnnyvUxcfHo3r16vDz88Pw4cPxyy+/4NmzZ/Dy8oKVlRUOHjyI1atX46efflI6dI+IiIiIiIiIiNSvWCSlLl68iK+//hpGRkYKdbq6uqhatSosLS0BAJMnT8Zff/2FlStXIjIyEm5ubjhy5AjatWun7rCJiIiIiIioKLwzl19p5f1vYJ71Pr1qqykSog9XLJJS+/fvz7XO3NwcDx48kJZlMhlGjBiBESNGqCM0IiIiIiIiIiL6AMUiKUWkTvl940BEREREREREH6/YPH2PiIiIiIiIiIhKDialiIiIiIiIiIhI7ZiUIiIiIiIiIiIitWNSioiIiIiIiIiI1I4TnRMREREBuBwUk2+bJhVt1BCJ9ivIQ0H4KHIiIiLKD3tKERERERERERGR2jEpRUREREREREREasfhe0RERERERKWB/6SCteu2qmjj0DI9QpYqr/B/Z8i2kvckv6HMmh7GrI74CjKcu6hjoOKNPaWIiIiIiIiIiEjtmJQiIiIiIiIiIiK1Y1KKiIiIiIiIiIjUjkkpIiIiIiIiIiJSO050TtqjoBMvvifXiQm12MdOCPix6xMRERERERFpGntKERERERERERGR2jEpRUREREREREREasfhe0REREQFdDkoRiu3pSocHk5ERETqxJ5SRERERERERESkdkxKERERERERERGR2jEpRUREREREREREaqfVc0plZ2fj3r17CuXOzs6wsrLKc10hBJ4/fw4jIyM4OjoWUYRERERERERERPQhtDoplZycjNq1a8PNzQ3GxsZS+ffff4/u3bvnut6VK1cwYMAAxMbGIiUlBQ0bNsT27dvh4OCgjrCJiIiIiIiIiCgfxWL43v/+9z/cuXNHeuWVkEpKSkKPHj3g4eGByMhIREZGIiMjA8OGDVNjxERERERERERElJdikZSKi4vD06dPkZGRkW/bffv2ISIiAgsXLoRMJoOpqSnmzJmDI0eO4Pnz50UfLBERERERERER5atYJKV69uyJtm3bwtTUFOPGjUNiYmKuba9f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pwd3fHixcvkJmZmef+a9WqhYsXL8LExERpzPr6+rh8+TKePn2K6OhoODk55RtPVlYWdu3aJTcXYvny5XH9+nUkJCQAeDvH1IsXL/Ds2TPEx8ejatWqsLCwwKVLlxAUFASZTAZXV1cEBwfLDembN2+e0jhdXV1x6tQpvHr1Cq9fv4abm5s0JJ6ISJN0dXXRr18/ud5MBgYG6Nevn9w8TyYmJujXr5/cuWvRokXo2LEjdu/ejXPnzqFq1ao4duyYNO9RxYoVcenSJWzcuBFnz55Fo0aNMGXKFPz888/S5ODK9g8A3bp1Q6VKlfKM/Z9//sG9e/dw5coVtGjRAlu3bi1UfLntGwD69esn3UsU5XsEAP/73/+wbt06HD58GLa2tvD09Pyo2Kn40hGqGNhKREREREREREUiNfX/tXfnNgACMQAEL3X/JbkpQiogXQGaKWPl5zozc3b38YMdfJGbUgAAAADkRCkAAAB4Matr/JX1PQAAAAByJqUAAAAAyIlSAAAAAOREKQAAAAByohQAAAAAOVEKAAAAgJwoBQAAAEBOlAIAAAAgJ0oBAAAAkBOlAAAAAMjd/ypWi7Vw7xkAAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig, axes = plt.subplots(1, 3, figsize=(12, 3.5))\n", + "for ax, col in zip(axes, X.columns[:3]):\n", + " for label in sorted(y.unique()):\n", + " ax.hist(X.loc[y == label, col], bins=30, alpha=.6,\n", + " label=f'target={label}')\n", + " ax.set(title=col, xlabel=col, ylabel='count')\n", + "axes[0].legend()\n", + "fig.tight_layout()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*Takeaway: e.g. \"several features separate the classes well: the task is\n", + "learnable\".*\n", "\n", - "Here, you should describe the submission format. This is the format the participants should follow to submit their predictions on the codabench platform." + "*Add what your data needs: missing values, feature types, correlations,\n", + "time trends, groups...*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## The submission file\n", + "## 3. Evaluation\n", + "\n", + "Submissions are trained and scored with cross-validation (CV) on the\n", + "training data, one fold per benchopt repetition: `benchmark/objective.py`\n", + "defines the folds (`cv`), and `benchmark/benchmark_utils/metric.py` the\n", + "metric. Each fold's model is also scored on the public test set, and\n", + "predicts the private one, cut in `benchmark/datasets/real.py` (`prepare`).\n", + "The scoring program scores these predictions against the hidden private\n", + "labels. Every score is averaged over the folds. The public test set is shown live on\n", + "the leaderboard. The private one is hidden and gives the final ranking.\n", + "\n", + "### 3.1 Metric\n", + "\n", + "*Why this metric and not the obvious alternative (e.g. accuracy vs balanced\n", + "accuracy vs AUC under class imbalance)? What is the cost of each kind of\n", + "error for the use case of section 1?*\n", "\n", - "The input data are stored in a dataframe. To go from a dataframe to a numpy array we will use a scikit-learn column transformer. The first example we will write will just consist in selecting a subset of columns we want to work with." + "### 3.2 Split\n", + "\n", + "*Which unit is held out, in the CV folds and in the test sets (rows,\n", + "patients, sites, time periods), and why it matches how the model would be\n", + "used. Link it to the structure found in the EDA. Give the size of each split\n", + "in that unit.*\n", + "\n", + "### 3.3 Leakage checks\n", + "\n", + "*Show, with code, that the test sets are independent from the training set\n", + "for the generalization the leaderboard measures. Adapt the checks below to\n", + "your split.*" ] }, { "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], + "execution_count": 4, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:22.886122Z", + "iopub.status.busy": "2026-11-04T05:40:22.885880Z", + "iopub.status.idle": "2026-11-04T05:40:22.899777Z", + "shell.execute_reply": "2026-11-04T05:40:22.898328Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "public: 0 rows duplicated from train\n", + "private: 0 rows duplicated from train\n" + ] + } + ], "source": [ - "# %load solution/submission.py\n", - "from sklearn.ensemble import RandomForestClassifier\n", + "# No sample appears both in train and in a test set.\n", + "train_rows = set(map(tuple, X.round(8).values))\n", + "for name, Xt in X_test.items():\n", + " n_dup = sum(tuple(r) in train_rows for r in Xt.round(8).values)\n", + " print(f\"{name}: {n_dup} rows duplicated from train\")\n", "\n", + "# For a group split, assert that no group is on both sides, e.g.:\n", + "# assert not set(groups_train) & set(groups_public)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:22.905079Z", + "iopub.status.busy": "2026-11-04T05:40:22.904853Z", + "iopub.status.idle": "2026-11-04T05:40:26.745266Z", + "shell.execute_reply": "2026-11-04T05:40:26.743868Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "train vs public: AUC = 0.46\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "train vs private: AUC = 0.50\n" + ] + } + ], + "source": [ + "# Adversarial validation: can a model tell train from test? AUC ~ 0.5 means\n", + "# the test sets look like the train set (no shift a model could exploit).\n", + "from sklearn.ensemble import RandomForestClassifier\n", + "from sklearn.model_selection import cross_val_score\n", "\n", - "# The submission here should simply be a function that returns a model\n", - "# compatible with scikit-learn API\n", - "def get_model():\n", - " return RandomForestClassifier()\n" + "for name, Xt in X_test.items():\n", + " X_adv = pd.concat([X, Xt])\n", + " y_adv = np.r_[np.zeros(len(X)), np.ones(len(Xt))]\n", + " auc = cross_val_score(RandomForestClassifier(random_state=0), X_adv, y_adv,\n", + " cv=5, scoring='roc_auc').mean()\n", + " print(f\"train vs {name}: AUC = {auc:.2f}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Local testing pipeline\n", + "*Takeaway. If you split by group or time, a shift between train and test\n", + "can be expected and wanted: say which shift the leaderboard measures.*\n", + "\n", + "### 3.4 Baselines and their spread over the folds\n", "\n", - "Here you can show how the model will be used to generate predictions on the test set, and how the evaluation will be performed." + "`benchopt run` trains and scores the solvers exactly as the platform does,\n", + "once per fold, with the dataset, solvers, seed and 5 folds of\n", + "`local_config.yml`. `Dummy` is the floor and `RandomForest` the sample\n", + "submission. The sample submission must clearly beat the floor (else the task\n", + "is not learnable from this data) and leave room above it (else it is\n", + "trivial).\n", + "\n", + "The spread over the folds tells how large a leaderboard gap must be to mean\n", + "something. The CV, public and private scores of a baseline should agree\n", + "within it." ] }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, + "execution_count": 6, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:26.752275Z", + "iopub.status.busy": "2026-11-04T05:40:26.752028Z", + "iopub.status.idle": "2026-11-04T05:40:37.262525Z", + "shell.execute_reply": "2026-11-04T05:40:37.260045Z" + } + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Accuracy on test set: 0.95\n" + "Benchopt is running!\r\n" ] }, { - "name": "stderr", + "name": "stdout", + "output_type": "stream", + "text": [ + "Loading objective, datasets and solvers..." + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " done.\r\n" + ] + }, + { + "name": "stdout", "output_type": "stream", "text": [ - "/home/tom/.local/miniconda/lib/python3.12/site-packages/sklearn/base.py:1363: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples,), for example using ravel().\n", - " return fit_method(estimator, *args, **kwargs)\n" + "Real \r\n", + " |--classification-accuracy \r\n" ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[1;34m |--Dummy:\u001b[0m \u001b[1;32mdone\u001b[0m\u001b[1;36m (cached)\u001b[0m \r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[1;34m |--RandomForest:\u001b[0m \u001b[1;32mdone\u001b[0m \r\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[1;32mSaving result in: outputs/starting_kit.parquet\u001b[0m \r\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
accuracy_cvaccuracy_publicaccuracy_private
meanstdmeanstdmeanstd
solver_name
Dummy0.6220.0060.6750.0000.5960.000
RandomForest0.9500.0320.9560.0180.9350.012
\n", + "
" + ], + "text/plain": [ + " accuracy_cv accuracy_public accuracy_private \n", + " mean std mean std mean std\n", + "solver_name \n", + "Dummy 0.622 0.006 0.675 0.000 0.596 0.000\n", + "RandomForest 0.950 0.032 0.956 0.018 0.935 0.012" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "model = get_model()\n", - "X_train, y_train = get_train_data(\"dev_phase/input_data\")\n", - "model.fit(X_train, y_train)\n", + "!benchopt run benchmark --config local_config.yml \\\n", + " --no-plot --no-html --no-display --output outputs/starting_kit.parquet\n", "\n", - "X_test = pd.read_csv(\"dev_phase/input_data/test/test_features.csv\")\n", - "from ingestion_program.ingestion import evaluate_model\n", - "y_test = evaluate_model(model, X_test)\n", + "from benchopt.results import read_results\n", + "from benchmark.benchmark_utils.metric import score\n", "\n", - "from scoring_program.scoring import compute_accuracy\n", - "print(\"Accuracy on test set:\", compute_accuracy(y_test, pd.read_csv(\"dev_phase/input_data/test/test_labels.csv\")))" + "results = read_results('outputs/starting_kit.parquet')\n", + "# The private score, computed per fold as the scoring program does.\n", + "results['objective_accuracy_private'] = [\n", + " score(y_test['private'], pred) for pred in results['objective_private_pred']]\n", + "scores = [f'objective_accuracy_{name}' for name in ('cv', 'public', 'private')]\n", + "(results.groupby('solver_name')[scores].agg(['mean', 'std']).round(3)\n", + " .rename(columns=lambda c: c.removeprefix('objective_'), level=0))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Submission\n", + "*Takeaway: e.g. \"the sample submission beats the floor by 0.3, and gaps below\n", + "0.03 (the spread over the folds) are noise\".*\n", + "\n", + "## 4. Submission format\n", "\n", - "To submit your code, you can refer to the actual challenge." + "A submission is a single `submission.py` defining `class Solver(CompetSolver)`.\n", + "Its `get_model` method returns the untrained model, and an optional `fit`\n", + "method trains it (by default `model.fit(X_train, y_train)`). The platform\n", + "trains the model once per fold, then calls `model.predict(X)` on the\n", + "held-out part of the fold and on the test sets. See\n", + "`benchmark/benchmark_utils/base_solver.py` for the full contract. The sample\n", + "submission:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "execution": { + "iopub.execute_input": "2026-11-04T05:40:37.268823Z", + "iopub.status.busy": "2026-11-04T05:40:37.268578Z", + "iopub.status.idle": "2026-11-04T05:40:38.135802Z", + "shell.execute_reply": "2026-11-04T05:40:38.132465Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\"\"\"Sample submission: the starting point participants copy and improve.\r\n", + "\r\n", + "A submission is a benchopt solver: a ``submission.py`` defining\r\n", + "``class Solver(CompetSolver)`` with a ``get_model`` method (and optionally\r\n", + "``fit``). See ``benchmark/benchmark_utils/base_solver.py`` for the contract.\r\n", + "The bundle ships this file as the Codabench sample submission.\r\n", + "\r\n", + "Copy it to a folder of your own as ``submission.py`` and run it exactly as\r\n", + "the platform does, with the dataset, seed and folds of ``local_config.yml``::\r\n", + "\r\n", + " benchopt prepare benchmark --config local_config.yml\r\n", + " benchopt run benchmark --config local_config.yml \\\r\n", + " -s my_submission/submission.py\r\n", + "\"\"\"\r\n", + "\r\n", + "from sklearn.ensemble import RandomForestClassifier\r\n", + "\r\n", + "from benchmark_utils.base_solver import CompetSolver\r\n", + "\r\n", + "\r\n", + "class Solver(CompetSolver):\r\n", + "\r\n", + " name = \"RandomForest\"\r\n", + "\r\n", + " def get_model(self, meta):\r\n", + " return RandomForestClassifier(random_state=0)\r\n" + ] + } + ], + "source": [ + "!cat benchmark/solvers/random-forest.py" ] }, { "cell_type": "markdown", "metadata": {}, - "source": [] + "source": [ + "## 5. Test and submit\n", + "\n", + "Copy the sample to `my_submission/submission.py`, improve it, and run it\n", + "locally exactly as the server does. The CV score you get here is the CV\n", + "column of the leaderboard.\n", + "\n", + "```bash\n", + "benchopt run benchmark --config local_config.yml -s my_submission/submission.py\n", + "```\n", + "\n", + "To submit, zip the folder containing your `submission.py` (and any file it\n", + "reads) and upload it on the competition page." + ] } ], "metadata": { "kernelspec": { - "display_name": "base", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -176,7 +871,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.11.2" } }, "nbformat": 4, diff --git a/tools/Dockerfile b/tools/Dockerfile index 8cb1eca..a2aea50 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,20 +1,15 @@ -# Step 1: Start from an official Docker image with desired base environment -# Good starting points are the official codalab images or -# pytorch images with CUDA support: -# - Codalab: codalab/codalab-legacy:py39 -# - Codalab GPU: codalab/codalab-legacy:gpu310 -# - Pytorch: pytorch/pytorch:2.8.0-cuda12.6-cudnn9-runtime -FROM codalab/codalab-legacy:py39 +# The competition image: a base image plus requirements.txt. Build it from +# the repo root and push it, then set docker_image in competition.yaml: +# +# docker build -f tools/Dockerfile -t /:v1 . +# # GPU (self-hosted GPU worker only) +# docker build -f tools/Dockerfile -t /:v1 \ +# --build-arg BASE=ghcr.io/x-datascience-datacamp/codabench-benchopt-gpu . +# +# With nothing in requirements.txt beyond the base image, skip this build and +# use the base image itself as docker_image. +ARG BASE=ghcr.io/x-datascience-datacamp/codabench-benchopt +FROM ${BASE} -# Set environment variables to prevent interactive prompts -ENV DEBIAN_FRONTEND=noninteractive - -# Step 2: Install system-level dependencies (if any) -# e.g., git, wget, or common libraries for OpenCV like libgl1 -RUN pip install -U pip - -# Step 3: Copy and pre-install all Python dependencies -# This 'requirements.txt' file should list pandas, scikit-learn, timm, etc. -# Place it in the same directory as this Dockerfile. COPY requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt diff --git a/tools/Dockerfile.base b/tools/Dockerfile.base new file mode 100644 index 0000000..db65510 --- /dev/null +++ b/tools/Dockerfile.base @@ -0,0 +1,20 @@ +# Base images for benchopt-powered Codabench competitions, built and pushed +# by .github/workflows/images.yml: +# +# ghcr.io/x-datascience-datacamp/codabench-benchopt (CPU torch) +# ghcr.io/x-datascience-datacamp/codabench-benchopt-gpu (CUDA torch) +# +# A competition extends one with its requirements.txt (tools/Dockerfile). +FROM python:3.12-slim + +# cu126 runs on any R525+ driver (cu128+ for Blackwell GPUs). The PyTorch +# wheels bundle the CUDA runtime, so no CUDA base image is needed. +ARG TORCH_CHANNEL=cpu +RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir \ + torch --index-url https://download.pytorch.org/whl/${TORCH_CHANNEL} +RUN pip install --no-cache-dir "benchopt>=1.10" pandas pyarrow scikit-learn + +# Data staged on a self-hosted worker is bind-mounted read-only here. +ENV BENCHOPT_DATA_HOME=/app/data + +RUN python -c "import benchopt, pandas, sklearn, torch" diff --git a/tools/create_bundle.py b/tools/create_bundle.py index 9f612ec..aa84fd8 100644 --- a/tools/create_bundle.py +++ b/tools/create_bundle.py @@ -1,38 +1,86 @@ +"""Build the Codabench bundle for the competition. + +The bundle ships the competition config, the pages, the sample submission, the +ingestion/scoring programs, and the phase directory as ``main_phase``: its +``input_data`` holds the phase ``config.yaml``, the benchopt **benchmark** +(a benchmark change needs no image rebuild) and the prepared **data** from +``$BENCHOPT_DATA_HOME`` (default ``benchmark/data``), as ``data/``. Its +``reference/`` folder, the hidden test labels, goes to ``reference_data`` +instead, which only the scoring program reads. The scoring program gets the +benchmark's ``benchmark_utils`` (the metric). Run ``benchopt prepare`` +first. For data too large for the bundle, staged on a self-hosted worker +instead, delete ``input_data/data/`` from the bundle. + +Usage +----- + python tools/create_bundle.py +""" + +import os import zipfile from pathlib import Path -ROOT_DIR = Path(__file__).parent.parent +ROOT_DIR = Path(__file__).resolve().parent.parent +DATA_DIR = Path(os.environ.get("BENCHOPT_DATA_HOME", + ROOT_DIR / "benchmark/data")) + +# Skip benchopt run artefacts / caches / staged data when zipping. +_SKIP_PARTS = ("outputs", "__cache__", "__pycache__", ".pytest_cache", "data") + + +def _walk(src): + """Every file under *src*, following symlinks (rglob does not descend + into a symlinked directory — it would silently drop shared code).""" + for parent, _dirs, files in os.walk(src, followlinks=True): + for name in files: + yield Path(parent) / name + + +def _add_file(bundle, src, arcname): + print(arcname) + bundle.write(src, arcname) + + +def _add_dir(bundle, src, arc_prefix): + assert src.exists(), f"{src} does not exist while it should." + for f in sorted(_walk(src)): + if not f.is_file(): + continue + if f.name.startswith(".") or f.name.endswith(".pyc"): + continue + if any(part in _SKIP_PARTS for part in f.relative_to(src).parts): + continue + _add_file(bundle, f, str(Path(arc_prefix) / f.relative_to(src))) + +def build_bundle(): + out = ROOT_DIR / "bundle.zip" + with zipfile.ZipFile(out, mode="w") as bundle: + _add_file(bundle, ROOT_DIR / "competition.yaml", "competition.yaml") + _add_file(bundle, ROOT_DIR / "logo.png", "logo.png") -PAGES_DIR = ROOT_DIR / "pages" -INGESTION_DIR = ROOT_DIR / "ingestion_program" -SCORING_DIR = ROOT_DIR / "scoring_program" -PHASE_DATA = ROOT_DIR / "dev_phase" + _add_dir(bundle, ROOT_DIR / "pages", "pages") + _add_dir(bundle, ROOT_DIR / "ingestion_program", "ingestion_program") + _add_dir(bundle, ROOT_DIR / "scoring_program", "scoring_program") + _add_dir(bundle, ROOT_DIR / "benchmark/benchmark_utils", + "scoring_program/benchmark_utils") + _add_file(bundle, ROOT_DIR / "benchmark/solvers/random-forest.py", + "solution/submission.py") -BUNDLE_FILES = [ - ROOT_DIR / "competition.yaml", - ROOT_DIR / "logo.png", - ROOT_DIR / "solution/submission.py", -] + _add_file(bundle, ROOT_DIR / "phases/main/input_data/config.yaml", + "main_phase/input_data/config.yaml") + _add_dir(bundle, ROOT_DIR / "benchmark", + "main_phase/input_data/benchmark") + if not DATA_DIR.is_dir(): + print(f"No prepared data at {DATA_DIR}: run `benchopt prepare`.") + for d in sorted(DATA_DIR.glob("*/")): + phase_dir = "reference_data" if d.name == "reference" else ( + f"input_data/data/{d.name}") + _add_dir(bundle, d, f"main_phase/{phase_dir}") + _add_dir(bundle, ROOT_DIR / "phases/reference_data", + "main_phase/reference_data") + print(f"-> {out.name}") if __name__ == "__main__": - with zipfile.ZipFile("bundle.zip", mode="w") as bundle: - for f in BUNDLE_FILES: - f = f.relative_to(ROOT_DIR) - print(f) - bundle.write(f) - for dirpath in [INGESTION_DIR, SCORING_DIR, PAGES_DIR, PHASE_DATA]: - assert dirpath.exists(), ( - f"{dirpath} does not exist while it should. Make sure you " - "followed all the instructions in the README before " - "creating the bundle." - ) - for f in dirpath.rglob("*"): - if not f.is_file(): - continue - if f.name.startswith(".") or f.name.endswith(".pyc"): - continue - f = f.relative_to(ROOT_DIR) - print(f) - bundle.write(f) + build_bundle() diff --git a/tools/run_docker.py b/tools/run_docker.py index d888b76..6e23cba 100644 --- a/tools/run_docker.py +++ b/tools/run_docker.py @@ -1,49 +1,84 @@ +"""Build the image and run ingestion + scoring in it (local platform test). + +Mirrors the platform layout: the phase config, the benchmark and the +prepared data are mounted as ``/app/input_data``, a submission as +``/app/ingested_program``, the programs as ``/app/program`` (with +``benchmark_utils``, the metric, next to scoring), and the hidden test labels +as ``/app/input/ref``. Prepare the data first with +``benchopt prepare benchmark -d Real`` (writes ``benchmark/data``). + +Usage +----- + python tools/run_docker.py [--data ] [--submission ] +""" + +import argparse from pathlib import Path + try: import docker except ImportError: raise ImportError( - "The 'docker' package is required to run this script. " - "Please install it using 'pip install docker'." + "The 'docker' package is required: pip install docker." ) REPO = Path(__file__).resolve().parent.parent if __name__ == "__main__": - client = docker.from_env() - print("Docker client initialized successfully.") + parser = argparse.ArgumentParser(description="Docker ingestion test") + parser.add_argument("--data", + default=str(REPO / "benchmark/data"), + help="Prepared data dir (benchopt data home)") + parser.add_argument("--submission", + help="Folder holding submission.py (default: the " + "sample benchmark/solvers/random-forest.py)") + args = parser.parse_args() + data = Path(args.data).resolve() - print("Building Docker image...") - client.images.build(path=".", tag="tommoral/template:v1") - print("Docker image built successfully with tag 'tommoral/template:v1'.") + client = docker.from_env() + image = "codabench-compet:dev" + print(f"Building {image}...") + client.images.build(path=str(REPO), dockerfile="tools/Dockerfile", + tag=image) - print("Running Docker container...") + phase = REPO / "phases/main/input_data" + # Without --submission, mount the sample solver as submission.py. + submission = ( + f"{args.submission}:/app/ingested_program" if args.submission + else f"{REPO / 'benchmark/solvers/random-forest.py'}:" + "/app/ingested_program/submission.py" + ) + out = REPO / "_codabench/ingestion" + out.mkdir(parents=True, exist_ok=True) + print("Running ingestion...") logs = client.containers.run( - image="tommoral/template:v1", - command="python3 /app/ingestion_program/ingestion.py", - remove=True, - name="ingestion", - user="root", + image=image, remove=True, name="ingestion", user="root", + command="python3 /app/program/ingestion.py", volumes=[ - f"{REPO}/ingestion_program:/app/ingestion_program", - f"{REPO}/dev_phase/input_data:/app/input_data", - f"{REPO}/ingestion_res:/app/output", - f"{REPO}/solution:/app/ingested_program", - ] + f"{REPO / 'ingestion_program'}:/app/program:ro", + f"{phase}:/app/input_data", + f"{REPO / 'benchmark'}:/app/input_data/benchmark:ro", + f"{data}:/app/input_data/data:ro", + submission, + f"{out}:/app/output", + ], ) print(logs.decode("utf-8")) + + score = REPO / "_codabench/scoring" + score.mkdir(parents=True, exist_ok=True) + print("Running scoring...") logs = client.containers.run( - image="tommoral/template:v1", - command="python3 /app/scoring_program/scoring.py", - remove=True, - name="scoring", - user="root", + image=image, remove=True, name="scoring", user="root", + command="python3 /app/program/scoring.py", volumes=[ - f"{REPO}/scoring_program:/app/scoring_program", - f"{REPO}/dev_phase/reference_data:/app/input/ref", - f"{REPO}/ingestion_res:/app/input/res", - f"{REPO}/scoring_res:/app/", - ] + f"{REPO / 'scoring_program'}:/app/program:ro", + f"{REPO / 'benchmark/benchmark_utils'}:" + "/app/program/benchmark_utils:ro", + f"{out}:/app/input/res", + f"{data / 'reference'}:/app/input/ref:ro", + f"{score}:/app/output", + ], ) print(logs.decode("utf-8")) print("Docker container ran successfully.") diff --git a/tools/setup_data.py b/tools/setup_data.py deleted file mode 100644 index 5bdc3a9..0000000 --- a/tools/setup_data.py +++ /dev/null @@ -1,53 +0,0 @@ -# Script to download the data from a given source and create the splits -# This is a mock version that generate fake problems -from pathlib import Path - -import numpy as np -import pandas as pd -from sklearn.datasets import make_classification -from sklearn.model_selection import train_test_split - -PHASE = 'dev_phase' - -DATA_DIR = Path(PHASE) / 'input_data' -REF_DIR = Path(PHASE) / 'reference_data' - - -def make_csv(data, filepath): - filepath.parent.mkdir(parents=True, exist_ok=True) - pd.DataFrame(data).to_csv(filepath, index=False) - - -if __name__ == "__main__": - - import argparse - parser = argparse.ArgumentParser( - description='Load or generate data for the benchmark' - ) - parser.add_argument('--seed', type=int, default=42, - help='Random seed for data generation') - args = parser.parse_args() - - # Generate and split the data - rng = np.random.RandomState(args.seed) - X, y = make_classification(n_samples=500, n_features=5, random_state=rng) - X_train, X_test, y_train, y_test = train_test_split( - X, y, test_size=0.4, random_state=rng - ) - X_test, X_private_test, y_test, y_private_test = train_test_split( - X_test, y_test, test_size=0.5, random_state=rng - ) - - # Store the data in the correct folders: - # - input_data contains train data (both features and labels) and only - # test features so the test labels are kept secret - # - reference_data contains the test labels for scoring - for split, X_split, y_split in [ - ('train', X_train, y_train), - ('test', X_test, y_test), - ('private_test', X_private_test, y_private_test), - ]: - split_dir = DATA_DIR / split - make_csv(X_split, split_dir / f'{split}_features.csv') - label_dir = split_dir if split == "train" else REF_DIR - make_csv(y_split, label_dir / f'{split}_labels.csv') \ No newline at end of file