Tools#

Tools components Tools components

tools/ hosts GPU tool services: admission, status and control, jobs, and the tool families that packs add.

Component

Code

What it does

GPU time sharing

tools/gpu_admission.py

Durable GPU admission shared by controllers and workers, with history and an audit trail. Work asks for admission before it uses a GPU. The store is private to NeMo Platform

GPU status + control

tools/gpu_control.py

Per-GPU status at /v1/status/gpus; enable or disable a GPU. Changes need the gpu:manage scope

GPU jobs

tools/gpu_jobs.py

The port a tool family launches GPU workers through. The backend is NeMo Platform Jobs

Run controller

tools/runs/controller.py

Leases durable runs, submits their GPU jobs, follows job status, checks results, retries or fails runs. A tool family subclasses it

Tool families#

A family comes from a pack. The one built today is maritime vessel detection (packs/maritime/vessel_detection/). It adds /v1/vessel-detection routes, the vessel_detection_*, sentinel_1_vessel* and sentinel_2_vessel* MCP tools, its run store and worker images, and runs its controller in vessel-controller.

An asynchronous run#

An asynchronous tool run An asynchronous tool run

The API only records the run. A controller leases it, a worker does the GPU work, and the result comes back through the same record.

Step

What happens

1-3

POST /v1/vessel-detection/sentinel-2/runs (MCP sentinel_2_vessel_detection_start) with an Idempotency-Key. The run is stored as queued; the same key returns the same run

4

vessel-controller claims the next run and holds a lease, renewed by a heartbeat

5-6

It resolves the input product from the catalog, builds the worker manifest and submits one GPU job, keeping its name on the run

7-9

NeMo Platform starts the worker image with the request manifest. The worker asks for GPU admission (a disabled GPU refuses), verifies the input assets, runs the model and writes the result file

10-13

The controller polls the job, downloads the result, checks it against the product, completes the run and stores the result. A failed run retries or fails with an error

14

GET /v1/vessel-detection/runs/{run_id} and .../result (MCP vessel_detection_get_status)

15

POST .../runs/{run_id}/cancel marks the run; the controller cancels the job

Worker contract#

A worker reads a fixed request file and writes a result file. Today only the vessel detector images implement it.

State: run records live in the geonemo_tools schema, kept by the family’s store.