Autoresearch Parameter Golf is my ongoing experiment repo for the OpenAI Parameter Golf competition.
It is not the official contest repo. It is a practical starter repo and working setup for my own training and experimentation against the same challenge data format and artifact constraints, with autoresearch-style Codex iteration set up out of the box.
The intended use is:
- run short fixed-budget search loops on a cheaper GPU such as
1x RTX 5090 - let Codex mutate
train.pyinside a controlled autoresearch loop - promote only the best candidates to more expensive
H100and8xH100production rehearsals
This is the primary path this repo is built for: official FineWeb data, a 5090 search tier, and Codex driving an autoresearch loop.
bash scripts/bootstrap.shUse the official cached FineWeb layout mirrored from the upstream contest repo:
TRAIN_SHARDS=80 bash scripts/download_official_fineweb.shThat writes the expected local files under:
./data/datasets/fineweb10B_sp1024/fineweb_train_*.bin./data/datasets/fineweb10B_sp1024/fineweb_val_*.bin./data/tokenizers/fineweb_1024_bpe.model
RUN_ID=baseline_5090_5min bash scripts/run_autoresearch_experiment.shThis creates:
./runs/autoresearch_5090/index/latest.json./runs/autoresearch_5090/index/best.json./runs/autoresearch_5090/results.tsv
bash scripts/init_autoresearch_session.shThis creates a lightweight Ralph-style state directory at:
./.autoresearch/session.json./.autoresearch/experiments.jsonl./.autoresearch/notes.md
Accepted winners also materialize into git-tracked files:
./state/autoresearch/accepted_state.json./configs/promoted/autoresearch_5090_best.json./configs/promoted/autoresearch_h100_8x_best.json./configs/promoted/autoresearch_h100_1x_best.json
Once that file exists, non-baseline autoresearch runs are gated on session.json being in ready state. This prevents Codex from starting prematurely against an uninitialized repo.
The session file also carries the current search policy for Codex, including:
- a soft 5090 artifact target band of
12,000,000to15,500,000bytes - a
~0.001 val_bpbmeaningful-win threshold - a limit of
3consecutive losing micro-tunes before the next run should be structural
On a fresh 5090 host with no previous runs/ tree, bash scripts/init_autoresearch_session.sh will fall back to ./state/autoresearch/accepted_state.json if it exists.
If you need to refresh those tracked files from the current local accepted winner before pushing, run:
.venv/bin/python scripts/autoresearch_state.py --state_dir ./.autoresearch sync-tracked-acceptedbash scripts/run_tensorboard_autoresearch.shOr compare completed runs:
.venv/bin/python compare_runs.py --results_tsv ./runs/autoresearch_5090/results.tsvFor a remote host, expose or forward port 6006, then open TensorBoard in your local browser. A typical SSH tunnel looks like:
ssh -L 6006:127.0.0.1:6006 <user>@<host>TensorBoard will show:
- the current run updating in real time
- previous runs beside it for comparison
- train loss, validation bpb, learning rates, throughput, and timing
- per-run grouping from the autoresearch run directory layout
This is a Codex-first repo. The intended loop is that Codex edits train.py, launches one experiment, reads structured outputs, and iterates.
For long-running autonomous search, prefer the supervisor loop:
bash scripts/run_codex_autoresearch_loop.shThe loop prepends ./.venv/bin to PATH before launching codex exec, so repo-local python and torchrun resolve to the bootstrapped environment instead of the host Python.
This is the closest match to Ralph's execution model:
- one fresh
codex execprocess per iteration - one experiment per invocation
- on-disk
.autoresearch/state as memory - the outer shell loop keeps the search running overnight
Loop logs land in:
./.autoresearch/activity.log./.autoresearch/errors.log./.autoresearch/runs/
For a read-only live tail that follows the newest iteration log:
bash scripts/watch_codex_autoresearch.shCodex should run on the same machine as the training job so it can edit the repo and launch experiments locally.
From the repo root:
- start Codex in
/workspace/autoresearch-parameter-golf - let Codex create and manage its own dedicated autoresearch branch
- give it the bootstrap prompt from
CODEX_AUTORESEARCH_PROMPT.md
Recommended launch command on a dedicated remote box you control:
codex --dangerously-bypass-approvals-and-sandboxThe two files Codex should read first are:
CODEX_AUTORESEARCH_PROMPT.mdfor the bootstrap promptprogram.mdfor the durable search policy
The expected Codex behavior is:
- edit
train.py - run one experiment at a time with
bash scripts/run_autoresearch_experiment.sh - read
latest.jsonandbest.json - read
.autoresearch/session.jsonand.autoresearch/notes.md - keep meaningful winners
- revert losers
- use git history as experiment memory
- commit the refreshed tracked accepted-state files after each accepted winner
- cover structural / byte-allocation directions early instead of only micro-tuning optimizer values
On the 5090 host:
cd /workspace/autoresearch-parameter-golf
bash scripts/bootstrap.sh
TRAIN_SHARDS=80 bash scripts/download_official_fineweb.sh
RUN_ID=baseline_5090_5min bash scripts/run_autoresearch_experiment.sh
bash scripts/init_autoresearch_session.shThen in one terminal:
bash scripts/run_tensorboard_autoresearch.shFor the preferred overnight loop:
bash scripts/run_codex_autoresearch_loop.shOr in a supervised interactive Codex terminal:
codex --dangerously-bypass-approvals-and-sandboxThen print the prompt file:
cat CODEX_AUTORESEARCH_PROMPT.mdThen paste the prompt into Codex.
The loop script uses CODEX_AUTORESEARCH_ONE_SHOT_PROMPT.md and launches a fresh codex exec each iteration.
Interactive Codex should create and use its own timestamped branch for the session.
Codex should use structured files, not logs:
./runs/autoresearch_5090/index/latest.json./runs/autoresearch_5090/index/best.json./runs/autoresearch_5090/results.tsv./runs/autoresearch_5090/runs/<run_id>/metrics.jsonl./.autoresearch/session.json./.autoresearch/experiments.jsonl./.autoresearch/notes.md
latest.json is the current run/result pointer. best.json is the standing best candidate.
.autoresearch/session.json is the readiness gate and accepted-state ledger.
The recommended live monitor is TensorBoard:
bash scripts/run_tensorboard_autoresearch.shOnce you have a strong candidate branch, the next step is to rehearse it against the actual challenge shape:
1xH100for transfer confirmation8xH100for the real10 minutetraining/eval regime- a packaged
records/...candidate folder you can turn into a PR
CONFIG_JSON=./configs/promoted/autoresearch_h100_1x_best.json RUN_ID=h100_1x_trial bash scripts/run_h100_1x_train.shThis writes:
./runs/runpod_h100_1x_10min/<run_id>/results.json./runs/runpod_h100_1x_10min/<run_id>/train.log./runs/runpod_h100_1x_10min/<run_id>/submission_bundle/
CONFIG_JSON=./configs/promoted/autoresearch_h100_8x_best.json RUN_ID=h100_8x_trial bash scripts/run_h100_8x_train.shThis uses torchrun --standalone --nproc_per_node=8 under the hood.
By default, the 8xH100 launcher now runs in submission-style train mode:
- no periodic validation
- no eval-on-step-0
- no LAWA eval inside the timed train phase
- export the artifact, then score it in a separate eval run
If you want the older full-rehearsal behavior with train-time validation, set:
SUBMISSION_TRAIN_ONLY=0 RUN_ID=h100_8x_trial bash scripts/run_h100_8x_train.shUse a separate eval run so you have an exact artifact-reload result and wall-clock number for evaluation:
ARTIFACT_PATH=./runs/runpod_h100_8x_10min/h100_8x_trial/submission_bundle \
RUN_ID=h100_8x_eval \
bash scripts/run_h100_8x_eval.shThe eval launcher will automatically use the config.json saved beside the training run artifact when available, so eval uses the exact exported model config instead of only the base H100 config.
.venv/bin/python package_submission_candidate.py \
--train_results_json ./runs/runpod_h100_8x_10min/h100_8x_trial/results.json \
--eval_results_json ./runs/runpod_h100_8x_eval/h100_8x_eval/results.json \
--track track_10min_16mb \
--name "My Candidate" \
--author "Your Name" \
--github_id your-github-id \
--blurb "Short summary of the method."This creates:
./submission_candidates/track_10min_16mb/<date>_<slug>/README.md./submission_candidates/track_10min_16mb/<date>_<slug>/submission.json./submission_candidates/track_10min_16mb/<date>_<slug>/train_gpt.py- copied run logs, configs, manifests, and results JSONs
The package is intended to match the official Parameter Golf PR shape:
README.mdsubmission.json- train log(s)
train_gpt.pyand any counted dependencies
Source: official README
Important caveats from the official rules:
- record-track runs must train in under
10 minuteson8xH100 - evaluation has its own separate
10 minutelimit - artifact size is
code bytes + compressed model bytes - all counted code should live in
train_gpt.py - no external downloads, dataset access, or network calls are allowed during evaluation
Source: official README
This serves the autoresearch run tree on port 6006 and lets you compare current and previous runs in one place.
Each run writes TensorBoard events under:
./runs/autoresearch_5090/runs/<run_id>/tensorboard./runs/runpod_5090_single_gpu/tensorboard
The official openai/parameter-golf repo is the source of truth for:
- challenge rules
- allowed training/eval budgets
- official cached data layout
- submission requirements
This repo exists as an ongoing experiment setup:
train.pystays the main editable file- the data download flow mirrors the official contest setup
- runs write structured outputs instead of requiring log scraping
- Codex/autoresearch usage is documented and ready to use
- export, reload, validation, and artifact accounting are already wired together
train.py: main mutation target for Codexprepare.py: fixed prep and artifact-eval utilitiesprogram.md: agent contractCODEX_AUTORESEARCH_PROMPT.md: copy/paste Codex promptCODEX_AUTORESEARCH_ONE_SHOT_PROMPT.md: one-iteration prompt for the overnight loopAUTORESEARCH_SETUP.md: longer setup notesscripts/autoresearch_state.py: lightweight Ralph-style session state helperscripts/init_autoresearch_session.sh: creates.autoresearch/session.jsonscripts/run_codex_autoresearch_loop.sh: freshcodex execsupervisor loopscripts/run_autoresearch_experiment.sh: one fixed-budget autoresearch runscripts/runpod_5090_train.sh: manual single-GPU training wrapper
Use structured files, not raw logs:
output_dir/results.jsonoutput_dir/crash.jsonoutput_dir/metrics.jsonlresults.tsvoutput_dir/submission_bundle/manifest.json
The autoresearch loop should primarily read:
./runs/autoresearch_5090/index/latest.json./runs/autoresearch_5090/index/best.json
Recommended install:
bash scripts/bootstrap.shManual equivalent:
uv sync --frozen --extra dev --extra tokenizerUseful helpers:
make autoresearch-baseline
make init-autoresearch-session
make tensorboard-autoresearch
make compare-autoresearch- This repo is an ongoing experiment repo, not a finished leaderboard submission.
- The default counted code path is just
train.py, which keeps artifact accounting close to Parameter Golf expectations. - The 5090 loop is a production-proxy search tier, not the final target itself.
- The final contest objective is still the official one from
openai/parameter-golf.