Distributed Evaluation
Scale evaluations across multiple nodes using SLURM, Kubernetes, Ray, or manual sharding.
How Sharding Works
Each worker runs the same nel eval run command. Two environment variables control the split:
nel eval run auto-detects these and evaluates only its assigned problem range.
SLURM
SLURM config file
Use cluster.type: slurm with shards: to enable array job sharding:
Run
This:
- Generates
eval.sbatchwith#SBATCH --array=0-15 - Each array task exports
NEL_SHARD_IDXandNEL_TOTAL_SHARDS - Each task writes results to
shard_N/subdirectories
Merge results
After all array tasks complete:
This discovers all shard_N/ directories, deduplicates any overlapping results, and produces merged bundles with combined scores.
Kubernetes
Use a K8s Indexed Job for native parallelism:
The manifest uses completionMode: Indexed with 8 completions. Each pod gets JOB_COMPLETION_INDEX mapped to NEL_SHARD_IDX:
After all pods complete, merge with nel eval merge.
Ray
For Ray clusters (compatible with NeMo Gym’s Ray infrastructure):
Each shard runs as a @ray.remote task. Results are merged in-process after all tasks complete.
From Python
Docker Compose
For local multi-container sharding:
Manual Sharding (Any Orchestrator)
Works anywhere you can set environment variables:
Shard Size Distribution
Problems are distributed evenly. For 14,000 problems across 16 shards:
When the total doesn’t divide evenly, early shards get one extra problem (e.g., 14,001 problems / 16 shards = shard 0 gets 876, shards 1-15 get 875).
Limitations
shardsis incompatible with heterogeneous SLURM jobs (multiple node pools). Use a single pool when sharding.shardsandauto_resumecannot be used together. Use SLURM--requeuefor per-task retries in array mode.run_batch()environments (e.g., legacy containers) are not shardable — a warning is emitted if shard env vars are detected.