Skip to content

feat(serverless): add sample dataset commands for spaces - #268

Merged
Robert-Stam merged 2 commits into
mainfrom
feat/serverless-sample-datasets
Nov 25, 2026
Merged

Robert-Stam merged 2 commits into
mainfrom
feat/serverless-sample-datasets

Conversation

@Robert-Stam

Copy link
Copy Markdown
Contributor

Summary

Adds qcloud serverless space dataset for the public API's SampleDatasetService (qdrant/cloud/serverless/space/dataset/v1, already in v0.234.0, so no dependency bump). Before this PR, none of the four RPCs had a CLI command.

Command RPC
dataset list <space-id> ListSampleDatasets
dataset describe <space-id> <dataset-id> ListSampleDatasets filtered by ID; there is no Get RPC and the catalog is small
dataset load start <space-id> <dataset-id> [--collection NAME] [--wait] LoadSampleDataset, then GetSampleDatasetLoad while waiting
dataset load list <space-id> ListSampleDatasetLoads (fetches all pages by default; --page-size / --page-token page manually)
dataset load describe <space-id> <load-id> GetSampleDatasetLoad

Behaviour

  • dataset list: ID | NAME | POINTS | SIZE | INDEXED SIZE | VECTORS | VERSION. VECTORS lists the vector names; the unnamed vector shows as default and sparse vectors get (sparse), e.g. default, image, bm25 (sparse).
  • dataset describe: size and point count, then a dense vector table (NAME | SIZE | DISTANCE | MULTIVECTOR | MODEL) and a sparse vector table (NAME | IDF | MODEL), so users know which model to use for query vectors. An unknown ID gives an error that points to dataset list.
  • load start: --collection defaults to the dataset ID. The ID pattern is a subset of the collection name pattern, so it is always a valid collection name. Without --wait it prints the load ID and a load describe command to follow it.
  • --wait (default timeout 30m) polls until SUCCEEDED, printing status=RUNNING progress=35.2/75.4 MiB (46%) to stderr. FAILED, FAILED_TO_SYNC, NOT_FOUND and SKIPPED count as failures. As with other create-with-wait commands, the load (text or JSON) is printed with its last status before the error, so its ID and reason aren't lost. Today serverless-backend only sets RUNNING, SUCCEEDED and FAILED.
  • load list: ID | DATASET | VERSION | COLLECTION | STATUS | PROGRESS | DURATION | CREATED. The server only returns loads from the last 30 days.
  • Completion: the space ID is completed for the first argument. For the second, the datasets of that space or the loads of that space are completed (completion.SpaceSampleDatasetIDCompletion, SpaceSampleDatasetLoadIDCompletion).

Plumbing

  • qcloudapi.Client.ServerlessSampleDataset()
  • testutil.FakeServerlessSampleDatasetService, registered as env.ServerlessDatasetServer
  • output.SampleDatasetLoadStatus, output.SampleDatasetDistance

Worth a look in review

  • Naming: dataset load start follows the backup restore trigger / backup restore list grouping. start reads better than trigger here, but tell me if you'd rather keep trigger.
  • Default collection name: defaulting --collection to the dataset ID is a CLI-side convenience; the API requires the field.

Testing

  • dataset_test.go: 23 tests. They cover table and JSON output for all five commands, the request fields sent, the default and custom collection, wait success, failure (load printed, reason in the error) and timeout (JSON printed), automatic and manual pagination including totalSize, missing args, and backend errors.
  • make lint (0 issues), make build, make test, make docs (reference docs regenerated).
  • Not run against a real space.

🤖 Generated with Claude Code

Written with Overlord from https://overlord.qdrant.tech/r/1089/t/7529

Add "qcloud serverless space dataset" for the SampleDatasetService:

- dataset list <space-id>: the datasets that can be loaded into the space
- dataset describe <space-id> <dataset-id>: size, vectors and embedding models
- dataset load start <space-id> <dataset-id> [--collection] [--wait]
- dataset load list <space-id> (paginated)
- dataset load describe <space-id> <load-id>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Robert-Stam
Robert-Stam requested a review from a team November 25, 2026 14:02
@Robert-Stam
Robert-Stam requested a review from a team as a code owner November 25, 2026 14:02
@Robert-Stam
Robert-Stam merged commit 03d218a into main Nov 25, 2026
5 checks passed
@Robert-Stam
Robert-Stam deleted the feat/serverless-sample-datasets branch November 25, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants