Skip to content

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

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

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

@luke-e-schaefer luke-e-schaefer commented Aug 25, 2026

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

Greptile Summary

Adds a model-scoped API for listing run IDs, with optional inclusion of runs across the model’s version lineage. The change also adds focused route tests and releases the API as version 0.21.3.

  • Adds Model.model_runs(include_versions=False).
  • Sends family=true when version-lineage runs are requested.
  • Adds unit tests for returned IDs and both route variants.
  • Updates the package version and changelog.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete client-side defects identified in the new model-run listing path.

The route construction, GET delegation, optional lineage query, return contract, tests, documentation, and package version are internally consistent.

Important Files Changed

Filename Overview
nucleus/model.py Adds the model-run listing method using the existing shared request transport; no actionable defect was identified.
tests/test_model_runs_listing.py Covers the default route, lineage query parameter, HTTP verb, payload, and returned run IDs.
pyproject.toml Advances the package version from 0.21.2 to 0.21.3.
CHANGELOG.md Documents the new method, lineage option, access scoping, and acknowledged server deployment dependency.

Reviews (1): Last reviewed commit: "feat(model): add Model.model_runs() to l..." | Re-trigger Greptile

Context used (3)

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>
@luke-e-schaefer
luke-e-schaefer marked this pull request as ready for review August 31, 2026 19:32
@luke-e-schaefer luke-e-schaefer self-assigned this Aug 31, 2026
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