Skip to content

Data onboarding: remove hardcoded paths, S3 dataset fetch, nuPlan docs - #525

Merged
eugenevinitsky merged 31 commits into
3.0from
ev/s3-data-fetch
Jul 24, 2026
Merged

Data onboarding: remove hardcoded paths, S3 dataset fetch, nuPlan docs#525
eugenevinitsky merged 31 commits into
3.0from
ev/s3-data-fetch

Conversation

@eugenevinitsky

@eugenevinitsky eugenevinitsky commented Jul 10, 2026

Copy link
Copy Markdown

What

Data onboarding: datasets move to S3 with a one-command fetch, and the hardcoded cluster paths in the default config are gone.

  • data_utils/fetch_data.py + data_utils/datasets.yaml: registry of shared S3 datasets; a bare run fetches the ~10 GB nuPlan mini train/val sets (public bucket, no AWS account needed). awscli added to install deps.
  • docs/data_storage.md (S3 layout, fetching, adding datasets) and docs/nuplan_data.md (full download → py123d → 123Drive conversion pipeline), plus a README data section.
  • Drive fails fast on a missing map_dir; when the path's basename is a registered dataset, the error names the exact fetch command (covered by tests/unit_tests/test_map_dir_missing.py).
  • validation_replay now ships disabled with env.map_dir preset to data/nuplan_mini_val — where the default fetch lands — in both puffer_drive.yaml (the config Hydra loads) and drive.ini.
  • All eval.behaviors_* evaluators (defaults, full_dir, and the 12 scene-category sections) are deleted along with their cluster-config overrides — their labelled-category data isn't onboardable to S3 and they were unused.

Why

Getting nuPlan data previously meant copying paths from someone's cluster home directory; the default config pointed at /scratch/ev2237/... and silently broke for everyone else. Now the data story is: clone, python data_utils/fetch_data.py, train — and any config that needs data that isn't fetched says exactly how to get it.

Notes

  • All review corrections from the doc walkthrough are applied: env vars (NUPLAN_DATA_ROOT, NUPLAN_MAPS_ROOT, PY123D_DATA_ROOT) exported before the commands that need them, py123d-conversion dataset=nuplan-mini syntax, --datasets nuplan-mini on the 123Drive convert, and the converter's env-var map resolution documented.
  • Doc CLI examples use Hydra override syntax (env.map_dir=...); the old --env.map-dir flag form is rejected by load_config since the Hydra switch.
  • Branch is merged up to current 3.0; 83 unit tests pass.

🤖 Generated with Claude Code

Eugene Vinitsky and others added 13 commits July 10, 2026 11:05
The default config enabled 13 evaluators pointing at a maintainer-local
/scratch/ev2237 nuPlan tree, giving external users 13 FileNotFoundError
tracebacks per eval pass. validation_replay and behaviors_full_dir now
ship disabled with a placeholder map_dir; the 11 per-category
behaviors_* sections (irreproducible categories_v021 split) are removed
in favor of a documented pattern users instantiate against their own
labelled bins. Cluster yaml configs drop the enabled=0 overrides whose
flags would no longer be registered by the ini-driven parser.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add docs/nuplan_data.md covering the mini-split download, the external
py123d converter (repo URL and invocation left as maintainer TODOs, with
a reduced-parallelism RAM note), the expected .bin layout, an example
replay training command, and how to enable the shipped-disabled nuPlan
evaluators. Link it from the README Data section alongside the WOMD
download scripts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Datasets live in the lab S3 buckets and are declared in
data_utils/datasets.yaml; fetch_data.py syncs them by name into
$PUFFERDRIVE_DATA_ROOT (default <repo>/data, gitignored).
docs/data_storage.md records the bucket layout, access process, and
the upstream license constraints on redistributing each dataset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the maintainer placeholders with the real two-stage flow:
py123d downloads/parses nuPlan into arrow, 123Drive converts arrow to
PufferDrive bins. Includes the RAM guidance (--workers, and the nuplan
preset's 20 s log chunking).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Manifest entries marked public: true sync with unsigned requests
(aws s3 sync --no-sign-request), so public-read buckets need no AWS
account. Verified against Motional's public nuplan bucket.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The dev prefix holds nuplan_train (~475 GB, ~170k bins) and nuplan_val
(~48 GB, ~17k bins); one entry covering both made the smallest possible
fetch half a terabyte. Entries now carry a required size field, printed
in --list and before every sync.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fetching nuplan_mini_train/val from the lab buckets is the default
path; the py123d + 123Drive pipeline stays as the do-it-yourself route.
Depends on the fetch script from the s3-data-fetch PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
nuPlan bins now live at s3://pufferdrive-bins/nuplan/0.3.2/{train,val}
with ~10 GB samples at 0.3.2-mini/{train,val}. The mini entries are the
documented default fetch; the personal-bucket dev entries are gone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
data/nuplan_mini_val is where data_utils/fetch_data.py lands the
default eval set, so enabling the eval is just enabled = true after a
fetch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky eugenevinitsky changed the title Add S3 dataset registry and fetch script Add S3 dataset registry, fetch script, and nuPlan data docs Jul 11, 2026
Eugene Vinitsky and others added 2 commits July 11, 2026 12:14
The pufferdrive-bins policy now grants anonymous GetObject + ListBucket
scoped to the nuplan/ prefix, with the CC BY-NC-SA notice uploaded at
nuplan/LICENSE.txt. The four nuplan entries fetch with unsigned
requests, so no AWS account is needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky eugenevinitsky changed the title Add S3 dataset registry, fetch script, and nuPlan data docs Data onboarding: remove hardcoded paths, S3 dataset fetch, nuPlan docs Jul 11, 2026
Eugene Vinitsky and others added 8 commits July 11, 2026 12:25
A nonexistent map_dir previously surfaced as a bare os.listdir
FileNotFoundError. When its basename matches a dataset registered in
data_utils/datasets.yaml, the error now names the exact fetch_data.py
command; otherwise it states plainly that the path does not exist.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A bare fetch_data.py run downloads the manifest entries marked
default: true (the ~10 GB minis); multiple names are accepted. The
map_dir tests use absolute tmp_path paths so they no longer depend on
the CWD or on whether the real dataset was fetched. Stale docstring
examples, dead line-number citations, and redundant doc/ini prose
removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PyPI carries AWS CLI v1, which handles the unsigned s3 sync identically
to a system v2. With this the fresh-user flow is: install, run
data_utils/fetch_data.py, train.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The default <repo>/data is where the drive.ini defaults expect data, so
an env var that silently moves fetches away from it invited a config
mismatch. Custom destinations are now explicit and per-invocation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread docs/nuplan_data.md
Comment thread docs/nuplan_data.md Outdated
'dataset.downloader.splits=[nuplan-mini_train, nuplan-mini_val, nuplan-mini_test]'

# Parse the downloaded logs + maps into py123d's arrow format:
py123d-conversion datasets=["nuplan-mini"]

@riccardosavorgnan riccardosavorgnan Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This returns an error, I think the correct syntax to override is:
py123d-conversion dataset=nuplan-mini

Error log:

(pufferdata_2) (base) ricky@rickynyuserver:~/pufferdata_2$ py123d-conversion datasets=["nuplan-mini"]
/home/ricky/miniconda3/lib/python3.13/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
  warnings.warn(
Could not override 'datasets'.
To append to your config use +datasets=[nuplan-mini]
Key 'datasets' is not in struct
    full_key: datasets
    object_type=dict

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Comment thread docs/nuplan_data.md Outdated
```bash
git clone https://github.com/vcharraut/123Drive && cd 123Drive
uv sync
uv run convert --preset nuplan --py123d_path /path/to/py123d/data --output ./nuplan_bins

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this does not find the logs correctly.

After processing the maps according to the previous instructions, py123d outputs 2 folders ./None/maps, ./None/logs in the directory where you run the command. When I then run the command pointing to that folder I get the following error:

(pufferdata_2) (base) ricky@rickynyuserver:~/pufferdata_2/123Drive$ uv run convert --preset nuplan --py123d_path ~/pufferdata_2/None/ --output ./nuplan_bins
warning: VIRTUAL_ENV=/home/ricky/pufferdata_2/.venv does not match the project environment path .venv and will be ignored; use --active to target the active environment instead
INFO bin_factory: 123Drive: /home/ricky/pufferdata_2/None/ -> ./nuplan_bins
INFO bin_factory: Filters - datasets: ['nuplan'], split_types: None, split_names: None, log_names: None, duration_s: 20, map_only: False
INFO bin_factory: No scenarios to process.

@riccardosavorgnan riccardosavorgnan Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From claude: the error appears because the nuplan-mini dataset has a different prefix for the scenes so the command scans the folder and doesn't find any. The fix is to pass the dataset name (nuplan-mini) as a flag in the command.

uv run convert --preset nuplan --datasets nuplan-mini --py123d_path ~/pufferdata_2/None/ --output ./nuplan_bins

Comment thread docs/nuplan_data.md Outdated
```bash
git clone https://github.com/vcharraut/123Drive && cd 123Drive
uv sync
uv run convert --preset nuplan --py123d_path /path/to/py123d/data --output ./nuplan_bins

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This command also requires to set
export PY123D_DATA_ROOT=/path/to/outputofpy123d/
otherwise the conversion fails.
The reason is that internally the call to the maps data is performed via this path and not via the flag --py123d_path

Eugene Vinitsky and others added 4 commits July 23, 2026 21:34
Review corrections from a full walkthrough of docs/nuplan_data.md:
- export NUPLAN_DATA_ROOT/NUPLAN_MAPS_ROOT/PY123D_DATA_ROOT before the
  commands that need them (both stages read the env vars; the converter
  resolves maps through PY123D_DATA_ROOT, not --py123d_path).
- py123d-conversion takes dataset=nuplan-mini, not datasets=[...].
- 123Drive convert needs --datasets nuplan-mini for the mini set or the
  scenario scan comes up empty.
- CLI examples use Hydra override syntax; the old --env.map-dir flag
  form is rejected by load_config.

Scope: delete every eval.behaviors_* section (defaults + full_dir + the
12 scene-category ones) and their cluster-config overrides; other
non-dataset changes are reverted to 3.0. Apply the dataset edits
(map_dir -> data/nuplan_mini_val, ship disabled) to puffer_drive.yaml
too — it is the config Hydra actually loads; drive.ini alone had no
runtime effect. Restore tests/unit_tests/test_map_dir_missing.py, which
covers the fetch-hint error this PR adds.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per-dataset license terms stay in data_utils/datasets.yaml.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eugenevinitsky and others added 3 commits July 23, 2026 21:52
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eugenevinitsky
eugenevinitsky merged commit 4e5f815 into 3.0 Jul 24, 2026
14 checks passed
@eugenevinitsky
eugenevinitsky deleted the ev/s3-data-fetch branch July 24, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants