Skip to content

feat: training set SDK support (DE-8692) - #480

Draft
luke-e-schaefer wants to merge 3 commits into
masterfrom
lukeschaefer/de-8692-training-sets
Draft

feat: training set SDK support (DE-8692)#480
luke-e-schaefer wants to merge 3 commits into
masterfrom
lukeschaefer/de-8692-training-sets

Conversation

@luke-e-schaefer

Copy link
Copy Markdown
Contributor

Training Set SDK support (DE-8692)

Adds SDK support for training sets — a mutable, versioned, model-scoped collection of dataset_item ids spanning one or more source datasets. Structurally a clone of the existing Benchmark resource, minus the freeze/finalize (training sets stay mutable).

Ticket: DE-8692

Draft — the backend routes in scaleapi are being built in parallel; route shapes here reflect the planned API and may need a final reconcile once that lands.

What's added

  • nucleus/training_set.pyTrainingSet dataclass mirroring Benchmark: from_json, refresh, update, delete, items, add_items, remove_items, new_version, family, lineage fields.
  • NucleusClient methods: create_training_set, get_training_set, list_training_sets, get_model_training_set, repin_training_set, update/delete_training_set, list/add/remove_training_set_items, create_training_set_version, list_training_set_family.
  • Model entry points: Model.create_training_set(...), Model.training_set, Model.repin_training_set(...).
  • Unified heterogeneous-source create/add accepting any mix of: item_ids, items=[{dataset_id, reference_id}], slice_id(s), dataset_id(s), and training_set_ids (merge other training sets), plus versioning kwargs (parent_training_set_id, bump_type, removed_item_ids). Async job polled to completion, then re-fetch.
  • New payload-key constants; TrainingSetItemsPage DTO; __all__ exports; pyproject.toml patch bump (0.21.2 → 0.21.3) + CHANGELOG entry.

Tests

tests/test_training_sets.py28 fully-mocked tests (no live API), modeled on test_benchmarks.py. Covers create from each source type, add/remove items, item pagination, new_version, and repin. pytest tests/test_training_sets.py → 28 passed; benchmark suite still 31 passed.

🤖 Generated with Claude Code

luke-e-schaefer and others added 3 commits August 27, 2026 00:06
…collections (DE-8692)

Add a TrainingSet resource mirroring Benchmark: a mutable, versioned,
model-scoped collection of dataset_item ids spanning one or more datasets.

- nucleus/training_set.py: TrainingSet dataclass (from_json, refresh, update,
  delete, items, add_items, remove_items, new_version, family) with lineage
  fields (parent_training_set_id, version_major/minor/label).
- NucleusClient methods: create_training_set (model-scoped, unified source
  signature incl. training_set_ids), get/list/update/delete, add/remove/list
  items, create_training_set_version, list_training_set_family, repin, and
  get_model_training_set.
- Model.create_training_set, Model.training_set, Model.repin_training_set.
- TrainingSetItemsPage DTO; new *_KEY constants (TRAINING_SET_ID(S)_KEY,
  PARENT_TRAINING_SET_ID_KEY); reuse existing item/slice/dataset/version keys.
- Exports, version bump 0.21.2 -> 0.21.3, CHANGELOG entry.
- tests/test_training_sets.py: 28 fully-mocked tests (no live API).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nload_items) (DE-8692)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant