Skip to content

feat(dashboard): serve run inventory from Redis at /api/v1/inspect/inventory - #388

Merged
ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:inspect/1-inventory
Oct 29, 2026
Merged

ShubyM merged 1 commit into
openrl-dev:mainfrom
ShubyM:inspect/1-inventory

Conversation

@ShubyM

@ShubyM ShubyM commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Why

There is no single place to see which runs exist and whether they are still going. This PR adds a read-only endpoint for that on the API server. It is one of two independent PRs split from #383. The other one is #389.

What changed

  • The API server serves GET /api/v1/inspect/inventory. It lists each run with its model, recipe, and lifecycle. A run is active while a session is live and ended otherwise.
  • Runs come from the model and session records in Redis, read with the new StateStore.scan_values.

Data sources

Field Source Read with
runs[]: model, recipe, settings, client_status, created and completed times, session_ids Redis open_rl:model_meta:<run>, written by the API server StateStore.scan_values
runs[].lifecycle Redis open_rl:session:<id>, present while a session heartbeats StateStore.scan_values
errors A Redis read that fails or times out, or a run record that does not parse

Later PRs add one source each: Kubernetes pods, nodes, Workloads and ResourceSlices (#389), Prometheus for GPU and vLLM metrics, Cloud Logging for logs, and the shared volume for client metrics.

Scope

The inspect routes live in server/dashboard and share the API server's process, Redis, and service account. Every API server exposes them. A small follow-up wires in #389.

Verification

  • make test and make lint pass.
  • Against the cluster's Redis, all 32 runs match the existing dashboard, and the API server's other routes answer as before.

router = APIRouter(tags=["inspection"])


@router.get("/api/v1/inspect/inventory")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious why doesn't this API maps to the shapes we know:

/api/v1/sessions ?
/api/v1/runs ?
/api/v1/jobs ?
/api/v1/models ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have later PR's that will add the routes like this from the big dashboard PR's here is the list:

  • GET /api/v1/inspect/inventory
  • GET /api/v1/inspect/runs
  • GET /api/v1/inspect/runs/{run_id}/summary
  • GET /api/v1/inspect/runs/{run_id}/steps
  • GET /api/v1/inspect/runs/{run_id}/commands
  • GET /api/v1/inspect/sessions/{session_id}/summary
  • GET /api/v1/inspect/activity
  • GET /api/v1/inspect/query
  • GET /api/v1/inspect/accelerators
  • GET /api/v1/inspect/logs

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not particularly strong on any of the names so we can change them

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets go with this. since they are all routed to "/api/v1/inspect" so independent from the post training api, probably fine to keep it in api-server for simplicity of deployment.

…ventory

The API server serves a read-only list of runs at /api/v1/inspect/inventory,
built from the model and session records in Redis. A run is active while the
client has a live session and ended otherwise. A Redis failure or an
unreadable record becomes an entry in errors. Kubernetes data comes in a
separate change.
@ShubyM
ShubyM force-pushed the inspect/1-inventory branch from 2566800 to bb05e64 Compare October 29, 2026 18:02
@ShubyM
ShubyM merged commit 8c15b6a into openrl-dev:main Oct 29, 2026
16 checks passed
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.

2 participants