Skip to content

feat(model): Model.model_runs() — list a model's run ids - #478

Draft
luke-e-schaefer wants to merge 1 commit into
masterfrom
feat/model-model-runs-listing
Draft

feat(model): Model.model_runs() — list a model's run ids#478
luke-e-schaefer wants to merge 1 commit into
masterfrom
feat/model-model-runs-listing

Conversation

@luke-e-schaefer

Copy link
Copy Markdown
Contributor

Summary

Adds Model.model_runs() — the model-scoped counterpart to Dataset.model_runs(), which only lists a single dataset's runs. Hits the new GET /nucleus/model/:modelId/modelRun route.

run_ids = model.model_runs()                       # runs whose model_id is this model
run_ids = model.model_runs(include_versions=True)  # union across the version lineage (?family=true)
  • nucleus/model.py — new model_runs(include_versions=False) -> List[str], delegates to make_request({}, "model/{id}/modelRun", requests.get) (mirrors Dataset.model_runs).
  • Results are scoped server-side to runs on datasets the caller can read.
  • tests/test_model_runs_listing.py — mock unit tests: returns the ids / hits the right route, and include_versions=True appends ?family=true.
  • CHANGELOG 0.21.3 + pyproject version bump.

Test Plan

  • pytest tests/test_model_runs_listing.py → 2 passed. black/isort clean.
  • Live call 404s until the server route (scaleapi#158386) deploys — noted in the CHANGELOG.

Server dependency

Pairs with scaleapi#158386 (GET /nucleus/model/:modelId/modelRun).

🤖 Generated with Claude Code

The model-scoped counterpart to Dataset.model_runs(): lists every run under a
model via GET /nucleus/model/:modelId/modelRun. include_versions=True unions runs
across the model's version lineage (?family=true). Results are dataset-scoped
server-side. Adds a mock unit test, CHANGELOG entry, and version bump to 0.21.3.

Requires the matching scaleapi route (scaleapi#158386); live calls 404 until it deploys.

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