Add dataset tags to SDK for identification (DE-7033) - #456
Merged
Conversation
vinay553
force-pushed
the
vinayparakala/de-7033-add-dataset-tags-to-sdk
branch
2 times, most recently
from
April 6, 2026 21:52
3eff859 to
8f06f7a
Compare
vinay553
force-pushed
the
vinayparakala/de-7033-add-dataset-tags-to-sdk
branch
from
April 6, 2026 21:57
8f06f7a to
bf092a2
Compare
edwinpav
approved these changes
Apr 7, 2026
vinay553
force-pushed
the
vinayparakala/de-7033-add-dataset-tags-to-sdk
branch
from
April 8, 2026 21:42
bf092a2 to
ccb48bc
Compare
vinay553
force-pushed
the
vinayparakala/de-7033-add-dataset-tags-to-sdk
branch
from
May 8, 2026 15:48
ccb48bc to
9561851
Compare
Expose dataset tags through the Python SDK so customers can identify datasets labeled by Scale vs other vendors via the API. - Add `tags` field to DatasetInfo model (returned by dataset.info()) - Add get_tags(), add_tags(), remove_tags() methods to Dataset class - Use POST /tags/remove instead of DELETE to avoid proxy body-stripping - Use pydantic v1/v2 compat shim for null-coercion validator - Guard against passing a bare string instead of a list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vinay553
force-pushed
the
vinayparakala/de-7033-add-dataset-tags-to-sdk
branch
from
May 8, 2026 16:00
9561851 to
ce37cc4
Compare
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
tagsfield toDatasetInfomodel sodataset.info()returns dataset tagsget_tags(),add_tags(),remove_tags()methods toDatasetclass for programmatic tag managementTest plan
dataset.info()returns tags for a dataset with tags set in the UIdataset.add_tags(["Labeled by: Scale"])adds tagsdataset.get_tags()returns the current tag listdataset.remove_tags(["Labeled by: Scale"])removes tagsdataset.info()works against a server that doesn't yet return tags (defaults to[])🤖 Generated with Claude Code
Greptile Summary
tagsfield toDatasetInfo(with a null-coercing validator for backward compatibility) and three newDatasetmethods —get_tags(),add_tags(), andremove_tags()— that delegate to a new/dataset/{id}/tagsendpoint.remove_tagsuses HTTP DELETE with a JSON body, which works with the currentmake_requestplumbing but may be silently stripped by some intermediary infrastructure.coerce_null_tagsPydantic validator is missing the@classmethoddecorator, relying on apylint: disablecomment instead of following the recommended v1 style.Confidence Score: 5/5
Safe to merge — no P0 or P1 issues; only P2 style suggestions.
The change is well-scoped, backward-compatible (null-coercing validator + field default), and consistent with existing codebase patterns. Both findings are P2: a missing @classmethod decorator on the validator and a note about DELETE-with-body infrastructure risk. Neither blocks correctness.
No files require special attention; nucleus/dataset.py and dataset_info.py are the only changed files worth reviewing closely.
Important Files Changed
tags: List[str] = []field with a null-coercing validator for backward compatibility; validator is missing@classmethoddecorator.get_tags(),add_tags(), andremove_tags()methods; consistent with existingmake_requestpatterns;remove_tagsuses HTTP DELETE with a JSON body.test_dataset_tagscovering happy path, idempotency, and type-safety guard; comprehensive coverage of the new API surface.Sequence Diagram
sequenceDiagram participant User participant Dataset participant NucleusClient participant API User->>Dataset: dataset.info() Dataset->>NucleusClient: "make_request({}, dataset/{id}/info, GET)" NucleusClient->>API: "GET /dataset/{id}/info" API-->>NucleusClient: "{tags: [...], ...}" NucleusClient-->>Dataset: response dict Dataset-->>User: "DatasetInfo(tags=[...])" User->>Dataset: dataset.get_tags() Dataset->>NucleusClient: "make_request({}, dataset/{id}/tags, GET)" NucleusClient->>API: "GET /dataset/{id}/tags" API-->>NucleusClient: "{tags: [...]}" NucleusClient-->>Dataset: response[tags] Dataset-->>User: List[str] User->>Dataset: dataset.add_tags([Labeled by Scale]) Dataset->>NucleusClient: "make_request({tags:[...]}, dataset/{id}/tags, POST)" NucleusClient->>API: "POST /dataset/{id}/tags" API-->>NucleusClient: "{tags: [...]}" NucleusClient-->>Dataset: response[tags] Dataset-->>User: List[str] User->>Dataset: dataset.remove_tags([Labeled by Scale]) Dataset->>NucleusClient: "make_request({tags:[...]}, dataset/{id}/tags, DELETE)" NucleusClient->>API: "DELETE /dataset/{id}/tags body:{tags:[...]}" API-->>NucleusClient: "{tags: [...]}" NucleusClient-->>Dataset: response[tags] Dataset-->>User: List[str]Prompt To Fix All With AI
Reviews (9): Last reviewed commit: "Add dataset tags to SDK for identificati..." | Re-trigger Greptile