feat(datasets): enhance SDK with pagination, file ops, query APIs, and format parsing#1171
Open
jake11-oho wants to merge 6 commits into
Open
feat(datasets): enhance SDK with pagination, file ops, query APIs, and format parsing#1171jake11-oho wants to merge 6 commits into
jake11-oho wants to merge 6 commits into
Conversation
…d format parsing - Add PageResult[T] generic type for paginated responses across all listing APIs - Add new query APIs: get_dataset(), get_task(), get_task_metadata() - Add task file operations: browse/list/read/download files - Add dataset format parsers (pinchbench, swe, tb2) for structured task loading - Add CLI subcommands: info, files, cat, download with --offset/--limit pagination - Cache OSS bucket instance; use iterator-based listing for large result sets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cache dataset task counts in `meta/{org}/{dataset}/meta.json` to avoid
slow OSS listing on every `get_dataset()` call. Meta is auto-updated on
upload and can be manually refreshed via `refresh_metadata()`.
Add `sync_dataset()` for incremental cross-bucket dataset sync, adapted
from harbor viewer's DatasetSyncService. Supports dry-run diff preview,
server-side copy with GET+PUT fallback, and optional delete-extra mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users should call refresh_metadata() explicitly after modifying datasets rather than having upload_dataset() and sync_dataset() update meta automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change meta granularity from per-dataset (meta.json) to per-split
({split}.json), reducing write contention and update cost. Add optional
split parameter to refresh_metadata() for targeted refresh. Re-enable
auto-refresh after upload_dataset() and sync_dataset() at split level.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
PageResult[T]generic for paginated listing across all APIs (offset/limit)get_dataset(),get_task(),get_task_metadata()browse/list/read/downloadfilesinfo,files,cat,downloadwith--offset/--limitfixes #1170
Test plan
PageResult,DatasetInfo,TaskInfo, etc.)OssDatasetRegistrycovering pagination, file listing, metadata discoveryDatasetClientdelegation layerinfo,files,cat,download)🤖 Generated with Claude Code