ray
Ray
Library-reference skill for production, open-source Ray — 26 rules across 6 categories covering the path from training to serving. Ray's API surface churned hard through the 2.x line (Train V2 became the default, Serve removed parameters and handle classes outright, Ray Data reversed a deprecation), so a model fluent in the older corpus produces code that warns, errors, or silently means something else. Each rule names the wrong default it corrects; there is no rule for things a capable model already gets right.
Scope is classic-ML Ray on self-hosted/KubeRay clusters. LLM serving and batch inference (ray.serve.llm, ray.data.llm) are the sibling ray-llm skill.
Pinned to ray 2.57.0 (Python ≥ 3.10). API claims were verified against the unpacked 2.57.0 wheel; classic-ML examples were exercised on a live local Ray 2.57.0 runtime.
When to Apply
- Writing or reviewing distributed training code —
TorchTrainer,ScalingConfig, checkpointing, fault tolerance - Building data pipelines with Ray Data — reads,
map_batches, GPU inference pools, training ingest - Running hyperparameter sweeps with Ray Tune, especially combined with Ray Train
- Writing or reviewing Ray Serve deployments — scaling, handles, composition, production config
- Using Ray Core primitives directly — tasks, actors, object store, retries
- Standing up or reviewing production Ray infrastructure — KubeRay CRDs, job submission, fault tolerance, observability