In this article
Use the completion index as a versioned shard identity while making repeated attempts and result publication safe.
A fixed evaluation manifest contains independent input shards. An Indexed Job can give each completion a stable index so a worker selects the corresponding shard. This removes a queue from a simple static assignment, but the index is a logical identity, not proof that only one process will ever execute that work.
Freeze the shard mapping
Bind the index to a versioned manifest and model revision. A retry must resolve the same input partition rather than read a mutable directory whose ordering changed. Record the mapping before execution. If shard boundaries change, treat that as a different run instead of silently assigning new meaning to an old completion index.
Read identity through supported fields
With Indexed completionMode, use the documented completion-index identity and JOB_COMPLETION_INDEX environment variable. Keep the Pod name as an attempt identity, not the shard key. Distinct replacement Pods can represent the same index. Verify the deployed API’s supported fields rather than parsing incidental name formatting into application logic.
Separate parallelism from total work
Completions describes the indexed work set, while parallelism limits simultaneous execution. Resource availability can reduce actual concurrency further. Increasing parallelism does not create additional independent shards or split an oversized shard. An uneven manifest can leave a slow final partition even when most accelerators have finished their assignments.
Publish results safely
Kubernetes documents circumstances in which work can start more than once. Write attempt output separately, validate it and publish by the run-and-index identity using the storage system’s appropriate atomic or conditional mechanism. A completed Pod does not make arbitrary external writes transactional. Consumers should distinguish a validated result from an incomplete temporary object.
Verify completeness explicitly
Exercise a small manifest with one deliberately interrupted attempt. Compare completed indexes with the expected result identities and check duplicate publication handling. Success means every required shard has an accepted result under the chosen failure policy. Indexed identity does not establish semantic correctness, exactly-once processing, efficient partition balance or successful aggregation of the final evaluation.
Primary references
Indexed Job with Static Work Assignment.
Related reading: Retrying generation POSTs: idempotency must be explicit; Reproducible inference stacks: preserving a GPU pilot’s result.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.