tabarena
CLAUDE.md363 starsChanged 8 days agoApache-2.0View on GitHub
The primary agent guide for this repo is AGENTS.md. Read it first — everything in it applies here. This file only documents Claude-specific extensions.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adapt-tabarenaSkill
- add-modelSkill
- add-systemSkill
- benchmark-modelSkill
- update-leaderboardSkill
- upload-methodSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
When the user describes work that matches a skill's trigger criteria, invoke the skill via the Skill tool instead of recreating the steps …
- Very specific: line 29
Optional model deps: when adding code that imports an optional library (e.g., tabpfn, tabicl, xrfm), keep the import inside the wrapper's …
- Very specific: line 32
Mark what Claude posts: Every PR or issue body, comment and review comment Claude posts on the maintainer's behalf starts with the line 🤖 …
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
The primary agent guide for this repo is AGENTS.md. Read it first — everything in it applies here.
This file only documents Claude-specific extensions.
Claude-Specific Tooling
Skills (.claude/skills/)
add-model— Use whenever the user asks to add/integrate/wrap a new tabular ML model. The input is usually just a link (repository, paper, PyPI or Hugging Face page) or a name; the skill derives the name, keys, pin, license, organization and the authors' preprocessing recipe from those sources and asks only for what they leave open. It encodes the full change: a per-model folder (model.pywrapper,hpo.pysearch space,info.pyregistry entry) plus edits tomodels/__init__.py,models/utils.py, and thepyproject.tomlextra — and points to reference implementations for each model class (foundation, torch, sklearn-like). It also decides the model's untimed environmentwarmup(classmethod convention inmodels/warmup.py), asking the user when the library's warm-up/pre-compile entry point is unknown and reporting warm-up's limitation (main process + disk-backed caches only; parallel-fold Ray workers stay cold). The model is auto-discovered from itsinfo.pyand fit-tested automatically bytests/tabarena/models/test_all_models.py(tests specific to the model, if any, go intomodels/<key>/tests/, outside CI); only add asmoke_configs.pyoverride if its toy fit needs faster hyperparameters. Before the report, reviewer agents that did not write the wrapper check it and the pinned library for cheating, leakage and protocol violations along three lenses (references/model_review.md), and each finding is verified against the code before it is reported or fixed.add-system— The sibling ofadd-model, for a whole pipeline rather than a single model: AutoML frameworks (AutoGluon, LightAutoML, FLAML), LLM-driven agents, hosted prediction APIs, or a model run through a heavier self-managing interface (TabFM+). Use it whenever the thing being added does its own model selection, tuning and ensembling inside its own budget, so inventing a TabArena search space for it makes no sense. It createspackages/tabarena/src/tabarena/systems/<key>/(system.py= theExternalSystemModelsubclass,hpo.py= theSystemConfigGenerator,info.py=SystemInfo+MethodMetadata.system(...)), and its main judgment call istags:with-llmandclosed-source-apidecide which leaderboard entrant pools the system competes in, so the skill asks rather than guesses. For a hosted API (Step 1b) it also sets the wrapper contract (key from the environment, nothing that names the task or split in a request, separate fit and predict calls preferred, server version inget_metadata()) and checks the client withpython -P -m tabarena.tools.audit_system --offline. Sits beforebenchmark-modelin the lifecycle.benchmark-model— Use whenever a maintainer wants to run an already-integrated model on the benchmark (e.g. "benchmark TabM", "run Nori on the cluster", "benchmark<PR link>", "make a setup/eval script for DenseLight"). The input is short: a PR link, a model name, a repository link, or nothing when the conversation names the model; the skill resolves the registry name and takes the defaults for everything else. It first asks whether Claude should drive the run end-to-end here (launch, monitor, evaluate, report) or hand the launch and monitoring to the maintainer, then scaffolds a singletmp_scripts/run_<model>.pyat the repo root withsmoke,setupandevalsubcommands sharing onebenchmark_name+PathSetup(so they can't drift). Defaults: the full TabArena-v0.1 task set with all configs (0for foundation models without a search space), the run venv resolved to the one that imports this checkout, the model's pip extra installed into it, a local smoke fit on whatever compute exists (CPU when there is no GPU, GPU models included), and, mandatory for every GPU model,fake_memory_for_estimatesset to the card's VRAM in GB (asked when not inferable). In end-to-end mode it runssetup, applies the printed SkyPilot pool and launches its jobs, reports the percentage of work left at regular intervals viareferences/sky_progress.sh(checking failed items and their logs, relaunching the missing items after a fix), then runsevalwith all figures for the default subsets, reports the leaderboard with the new model's rows highlighted, and publishes a Claude artifact with the figures to paste into the PR. A model that was not integrated in the same session, in particular one from a contributor's PR, first goes through the add-model skill's agent review (Step 1b), and fixes on top of the PR follow the add-model conventions. A SkyPilot job pool draining a GCS claim queue is the default;--scheduler skypilotruns one managed job per spot VM instead, and--scheduler slurmthe same plan as a SLURM array (references/slurm_progress.shwatches that). The eval box-labels the new model in every Pareto figure (pareto_focus_new_methods, on by default inTabArenaEvalConfig). Registered systems run through the same plan (generator tuple,system_experiments=True); a hosted API getsreferences/run_api_system_template.py(audit,smoke,setup,eval): the client is read and the API probed for transduction and label lookup withtabarena.tools.audit_systembefore anything runs,smokeandevalcheck that the submitter's self-reported TabArena-Lite errors reproduce on the same splits (compare_reproduced_results), the key stays in the maintainer's shell, and the run goes from one on-demand CPU node (SlurmSingleNodeSetup,num_workers= the provider's concurrency). Sits in the lifecycle betweenadd-model(integrate) andupload-method(publish).upload-method— Use whenever a maintainer points at a benchmark run's output dir and wants to process / upload / register a method's results (e.g. "upload this method", "host/publish<model>'s results", "register<model>in the leaderboard"). By default Claude runs the whole flow itself after stating the plan (scripts/run_process_method.pyinspect →--process;scripts/run_upload_results.pydry-run →--no-dry-run, background + monitors, r2 verified after upload) and lands the edits: the model'sinfo.pyMethodMetadata(suite / date /cache_type/cache_kwargs/ verified, plus inspect-diff fixes), the arena-collection registration incontexts/<arena>/methods.py, and the run'sBENCHMARK_LOG.mdentry when the launch stage never wrote one. Once r2 is verified it frees the disk: the run's raw results, the cache copies made for the upload, itssetup_out/slurm_outdirs, the pinned worktrees and venv, and the SkyPilot bucket prefix, keeping only the smallmetadata.yaml+results/in the cache. A command sheet is only handed off when the env can't run a step (notabarena[benchmark]venv / no R2 creds). Results from a contributor's own run are verified first (references/verify_submission.md: restricted unpickling, a scan of everyresults.pkl, split/label hashes against our own run, hyperparameters against the search space, the claimed Elo reproduced withcompare, and the Elo impact of any problem found). Mirrors AGENTS.md → "Processing & uploading method artifacts (maintainers)".update-leaderboard— Use whenever a maintainer wants to regenerate the website artifacts and refresh a leaderboard Space with the latest results (e.g. "update the leaderboard", "regenerate the artifacts and refreshleaderboard-testing", "push the new results to the leaderboard"). Takes the path to the leaderboard Space repo (data/+main.py+ its own.venv) as its key input. It (1) pre-checks that newly added models classify correctly inwebsite/website_format.py(Foundation Model / Tree-based / … not❓ Other) and that every registered organization has a logo in the Space'sassets/logos/+views.pymap before generating, (2) runsscripts/run_generate_website_artifacts.py(background + monitor; the trailing ray SIGTERM traces are harmless), (3) refreshes the Space'sdata/via delete-then-copy (CSVs,n_datasets.jsonand the one-file page packpages.sqlite), (4) bumps the version history in the Space'swebsite_texts.py(new dated entry + current-version line, verified/unverified from the model'sinfo.py), and (5) optionally serves the Space locally (its own.venv,127.0.0.1:7860). Last stage afterupload-method; the maintainer commits/pushes (Git LFS + Xet).
The five skills above are for working inside this repo. The one below is for a different repository consuming TabArena as a dependency:
adapt-tabarena— Use whenever a user is building their own domain-specific benchmark (spectroscopy, genomics, time series, a vertical-specific tabular task) in a separate repo and wants to reuse TabArena's model zoo, task and experiment runner, and/or bencheval's leaderboard math instead of reimplementing that layer. Covers what to depend on (benchevalalone for leaderboard math vs.tabarenafor the registry and runner too), turning the domain's datasets intoUserTasks (data contract, split format, registering a domain eval metric), the repeated-k-fold + size-adaptive-repeats + group-aware outer protocol and the innerValidationProtocol(declared on the arena context and asserted on bagged experiments; thedata-foundryextra grouped folds need), a domain bundle subclass withModelConstraints, registering domain models next to TabArena's registry viaregister_model_info(or wrapping self-tuning pipelines as systems), layering domain preprocessing without forking any wrapper,ValidationProtocolparity, running locally or on a cluster (CacheConfig,JobBatch,tabflow_slurm), imputation and Elo anchoring incompare, building a full domain arena (anAbstractArenaContextsubclass, aTaskMetadataSourcecatalogue, amethods.pyroster, hosted artifacts, website output), the git-dependency PyPI trap, and a step that has the downstream author report the API gaps they hit to the TabArena maintainers. Distilled from a real migration (RamanBench,github.com/ml-lab-htw/RamanBench).
When the user describes work that matches a skill's trigger criteria, invoke the skill via the Skill tool instead of recreating the steps manually.
Working Style in This Repo
- Always run
ruff check --fixon touched files before reporting a task complete. Thefrom __future__ import annotationsrequirement (isortrequired-imports) is the most common CI failure on new files. CI now enforcesruff check .+ruff format --check ., and a pinned.pre-commit-config.yamlis available (pre-commit install) — see AGENTS.md "Lint & Format". - Tests live in the top-level
tests/, grouped by package — when adding a test forpackages/tabarena/src/tabarena/<area>/foo.py, mirror the path undertests/tabarena/<area>/test_foo.py. (tests/bencheval/andtests/tabflow_slurm/hold the other two packages;tests/integration/is for cross-package tests.) The exception is a model's or system's own tests: they go intomodels/<key>/tests/next to its code, stay out of the defaultpytestand CI, and run withpytest packages/tabarena/src/tabarena/models/<key>/tests(AGENTS.md "Testing"). - Model-fit tests are deselected by default and consolidated —
tests/tabarena/models/test_all_models.pyfits every registered model (markedmodels, skipped by the defaultpytest). Run one withpytest -m models -k <Model>; they needtabarena[benchmark], are slow, and skip GPU-only models without CUDA. There is no per-model test file intests/; tests specific to one model go intomodels/<key>/tests/. For non-model changes, the defaultpytestalready skips them.tests/tabarena/models/test_warmup_coverage.py(same marker) runspython -P -m tabarena.tools.audit_warmupper model and fails when a timed fit or predict imports a package the warm-up missed. - Run python from the repo root, with
-P—python -m ...orpython -c ...from the workspace directory that contains the editableautogluon/checkout shadows the installed AutoGluon and empties the model registry (AGENTS.md "Testing"). Usecd <repo root> && python -P -m ...for the audit CLI, the run scripts andrun_local; thepytestconsole script is safe from any cwd. - Optional model deps: when adding code that imports an optional library (e.g.,
tabpfn,tabicl,xrfm), keep the import inside the wrapper's_fit/ class body, never at module top-level — top-level imports break installs without that extra. - Writing style is enforced — AGENTS.md ends with an "AI Writing Tropes to Avoid" section. It covers docstrings, comments, markdown, commit messages, PR descriptions, and chat replies. The rules most likely to bite here: no em dashes /
--pivots by reflex, noX → Yarrows in docs, no "it's not X, it's Y" reframes, and no bold-first bullets in new docs. - PR and issue text follows the templates. PR bodies use
.github/pull_request_template.md: a two-to-four sentence summary, a collapsed<details><summary>Details</summary>block for the longer description, then Tests (see AGENTS.md "PR & Commit Guidance"). A skill's Report is for the chat and the PR body is for reviewers, so don't paste one into the other. Issues use the forms in.github/ISSUE_TEMPLATE/. - Mark what Claude posts. Every PR or issue body, comment and review comment Claude posts on the maintainer's behalf starts with the line
🤖 Generated with [Claude Code](https://claude.com/claude-code), so readers know before they read, unless the maintainer says otherwise for that text. Commits carry theCo-Authored-Byline instead. - Docstrings describe current behavior, not refactor history. When you rename, move, or remove code, write docstrings/comments about what the code is now — don't leave
Formerly X,used to live in Y,previously did Z, ornow delegates herenarratives, or dead references to deleted classes/modules. Rename/removal history belongs in git and the PR, not the source. Keep a historical note only when it's genuinely important to understanding the current code (e.g. a non-obvious backwards-compat shim). (previously/used to liveare fine when they explain current behavior and reference code that still exists.)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

