Repository navigation
Add S3/GCS cloud storage support via fsspec - #29
Merged
Merged
Conversation
Every command that accepts a dataset path now also accepts s3:// and gs:// URIs, alongside local paths and hf:// URLs: forge inspect s3://my-bucket/datasets/run_0413 forge convert gs://lab-data/rosbags ./out --format lerobot-v3 forge quality s3://my-bucket/datasets/droid --report report.html Design: a single utility (forge/io/paths.py) resolves any source to a local path, downloading remote datasets to a temp dir (cleaned up at exit) and handing them to the existing readers unchanged. This keeps every format — including video, HDF5, and rosbag, which need random file access — working identically to local paths, and leaves local behavior 100% unchanged. - fsspec is now a core dependency; s3fs/gcsfs are optional [s3]/[gcs] extras. Passing s3:// without s3fs installed fails with the exact pip command. - Wired into the CLI resolver (_resolve_dataset_path) and the quality/segment analyzers, so both the CLI and the Python API work with cloud URIs. - Writing outputs to cloud URIs is rejected fast with a clear message; writers remain local-only (documented as a known limitation). - Auth delegates entirely to AWS/GCP default credential chains — no credential handling of our own. - Tests (tests/test_io_paths.py): fsspec memory:// unit tests, a moto mock-S3 test, and end-to-end lerobot-v3/zarr resolution + CLI. No existing tests change. - Docs: README cloud section, forge/io/README.md (usage + connectivity diagnostics), forge/io/TESTING_MINIO.md, and a CHANGELOG entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every command that accepts a dataset path now also accepts
s3://andgs://URIs, alongside local paths andhf://URLs:Design
A single utility —
forge/io/paths.py— resolves any source to a local path, downloading remote datasets to a temp dir (auto-cleaned at process exit) and handing them to the existing readers unchanged. All file access funnels through the CLI resolver (_resolve_dataset_path) and the quality/segment analyzers, so nothing is scattered.Why download-to-temp instead of streaming? The format readers are deeply local-path-dependent — PyAV video keyframe seeks, HDF5 chunk reads, rosbag indexes,
open()+json.load, and Path-based format detection. Downloading once keeps every reader (and its tests) working identically to local paths. The fsspec plumbing is in place to add true range-read streaming per-format later (noted in CHANGELOG).Details
fsspecis now a core dependency;s3fs/gcsfsare optional[s3]/[gcs]extras. Passings3://withouts3fsfails with the exactpip installcommand.Testing
tests/test_io_paths.py: fsspecmemory://unit tests (always run), amotomock-S3 test, and end-to-end lerobot-v3/zarr resolution + CLI tests. 18 new tests, all passing.mainare unchanged).lerobot/droid_100dataset (464 MB, videos included):inspect,quality --sample,convert --dry-run, and cloud-output rejection all work. Seeforge/io/TESTING_MINIO.md.Docs
forge/io/README.md— usage + a guide to diagnosing cloud connectivity issues.forge/io/TESTING_MINIO.md— local MinIO setup & testing.CHANGELOG.md.🤖 Generated with Claude Code