Skip to content

feat: model create/edit parity with the dashboard UI [DE-8691] - #481

Draft
luke-e-schaefer wants to merge 1 commit into
masterfrom
luke/nucleus-sdk-model-parity
Draft

feat: model create/edit parity with the dashboard UI [DE-8691]#481
luke-e-schaefer wants to merge 1 commit into
masterfrom
luke/nucleus-sdk-model-parity

Conversation

@luke-e-schaefer

Copy link
Copy Markdown
Contributor

Summary

Brings the SDK's model create and edit to full parity with the Nucleus dashboard. Previously create_model() only sent name/reference_id/metadata/bundle_name/tags/trained_slice_ids, and there was no edit path at all.

Part of DE-8691. Backend companion: scaleapi branch luke/nucleus-model-rest-update-parity.

What changed

  • create_model() now accepts every field the UI exposes: description, architecture, num_parameters, training_data, input_schema, output_schema, structured training_data_fields ({key: value}, merged into metadata under the reserved key and indexed for search), and versioning (parent_model_project_id, bump_type, version_major, version_minor, version_label). The REST models/add endpoint already accepted all of these.
  • NucleusClient.update_model() / Model.update() — edit descriptive fields via the new POST /nucleus/model/:modelId/update endpoint (backend PR). A NO_UPDATE sentinel distinguishes "leave unchanged" from an explicit None ("clear").
  • Model.set_parent() — set/clear parent + version via the existing .../parent route.
  • Model gains description/architecture/num_parameters/training_data/input_schema/output_schema/parent_model_project_id/version_major/version_minor/version_label, populated by from_json (which now also reads bundle_name and falls back ref_idreference_id).
  • Version bump 0.21.3 + CHANGELOG.

Testing

⚠️ Draft. Existing model tests in tests/test_models.py hit the live API (need NUCLEUS_API_KEY); the new edit/create-field coverage is TODO before marking ready. Ran black/isort + py_compile locally.

🤖 Generated with Claude Code

Brings SDK model create/edit to parity with the Nucleus dashboard. Previously
create_model() only sent name/reference_id/metadata/bundle_name/tags/
trained_slice_ids and there was no edit path at all.

- create_model(): adds description, architecture, num_parameters, training_data,
  input_schema, output_schema, structured training_data_fields ({key: value},
  merged into metadata under the reserved key + indexed for search), and
  versioning (parent_model_project_id, bump_type, version_major/minor, version_label).
  The REST models/add endpoint already accepted all of these.
- NucleusClient.update_model() / Model.update(): edit descriptive fields via the new
  POST /nucleus/model/:modelId/update endpoint (scaleapi companion PR). NO_UPDATE
  sentinel distinguishes "leave unchanged" from an explicit None ("clear").
- Model.set_parent(): set/clear parent + version via the existing .../parent route.
- Model gains description/architecture/num_parameters/training_data/input_schema/
  output_schema/parent_model_project_id/version_major/minor/version_label, populated
  by from_json (which now also reads bundle_name and falls back ref_id -> reference_id).
- Version bump 0.21.3 + CHANGELOG.

Backend companion: scaleapi luke/nucleus-model-rest-update-parity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@luke-e-schaefer

Copy link
Copy Markdown
Contributor Author

Backend companion PR: scaleapi/scaleapi#158730 · Tracking: DE-8691

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