> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# Ray patterns

> A gallery of small Ray programs, one notebook each. Every notebook pairs a picture of a graph drawn in Eugo's visual Ray builder with the Ray code the builder…

Web page: https://eugo.io/docs/ganymede/ray_patterns/

A gallery of small Ray programs, one notebook each. Every notebook pairs a picture of a graph drawn in [Eugo](https://eugo.io)'s visual Ray builder with the Ray code the builder generated for it, then runs that code and checks the result. The generated code is plain Ray, so you do not need the builder to run or adapt it. The notebooks were run on Ray 2.55.1 with Ray capped at four CPUs and no GPU; the few that need a GPU or an external service are marked *code only*.

Each notebook has the same layout:

1. what the pattern is for and when to use it;
2. the graph in the visual builder;
3. a setup cell that starts Ray quietly;
4. the user functions the graph's nodes call;
5. the generated code (where a notebook edited it by hand, the cell's first line says so);
6. a check of the result;
7. a walkthrough that maps each node to the lines it produced;
8. other forms the builder can emit (a `bind()` DAG, a standalone script, a Ray Job submit script), where they exist;
9. clean-up.

## Running the notebooks

```bash
pip install "ray[default,data,serve,train,tune]==2.55.1" "protobuf<7" jupyterlab
```

Some notebooks need more packages; the *Extra packages* column below lists them. For example:

```bash
pip install torch lightgbm xgboost optuna
```

Then open a notebook in JupyterLab and run all cells. Each notebook starts and stops its own local Ray instance, so run them one at a time. The Serve notebooks listen on local ports 8000, 8123 or 9000.

The visual builder itself is not publicly available, and nothing here needs it.

## Ray Core

Tasks, actors, objects and scheduling.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 1 | [Map and reduce with remote tasks](https://eugo.io/docs/ganymede/ray_patterns/core/01_map-reduce/) | Two mapper tasks run in parallel and a reducer task combines their results. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/map-reduce.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/map-reduce.png" width="160" alt="graph"></a> |
| 2 | [Stateful actor: a parameter server](https://eugo.io/docs/ganymede/ray_patterns/core/02_parameter-server/) | An actor keeps state between calls. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/parameter-server.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/parameter-server.png" width="160" alt="graph"></a> |
| 3 | [Fan out one task per list item](https://eugo.io/docs/ganymede/ray_patterns/core/03_map-over-list/) | A single node launches one remote task per element of a list and gathers all results with one ray.get. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/map-over-list.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/map-over-list.png" width="160" alt="graph"></a> |
| 4 | [Distributed queue between a producer and a consumer](https://eugo.io/docs/ganymede/ray_patterns/core/04_queue-producer-consumer/) | A ray.util.queue.Queue connects a remote producer task to a remote consumer task. *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/queue-producer-consumer.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/queue-producer-consumer.png" width="160" alt="graph"></a> |
| 5 | [Task resources, retries and scheduling options](https://eugo.io/docs/ganymede/ray_patterns/core/05_task-options/) | Per-call .options(): CPU and memory requests, automatic retries on application errors, a task name for the dashboard, the SPREAD scheduling strategy and a timeout on ray.get. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/task-options.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/task-options.png" width="160" alt="graph"></a> |
| 6 | [Multiple return values and streaming generators](https://eugo.io/docs/ganymede/ray_patterns/core/06_multiple-returns-and-streaming/) | One task returns two separate ObjectRefs (num_returns=2); another is a generator whose values stream back one by one (num_returns="streaming"). | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/multiple-returns-and-streaming.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/multiple-returns-and-streaming.png" width="160" alt="graph"></a> |
| 7 | [Take the first results with ray.wait](https://eugo.io/docs/ganymede/ray_patterns/core/07_wait-first-ready/) | Three tasks with different run times feed a Wait node. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/wait-first-ready.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/wait-first-ready.png" width="160" alt="graph"></a> |
| 8 | [Cancel a running task](https://eugo.io/docs/ganymede/ray_patterns/core/08_cancel-task/) | A long-running task is cancelled with ray.cancel. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/cancel-task.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/cancel-task.png" width="160" alt="graph"></a> |
| 9 | [Share one object with ray.put](https://eugo.io/docs/ganymede/ray_patterns/core/09_put-shared-object/) | A Put node stores a value in the object store once; two tasks receive the same ObjectRef instead of each getting their own copy. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/put-shared-object.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/put-shared-object.png" width="160" alt="graph"></a> |
| 10 | [Named actor: create, look up, call and kill](https://eugo.io/docs/ganymede/ray_patterns/core/10_named-actor-lifecycle/) | A detached actor is registered under a name, looked up again with ray.get_actor, called, and finally removed with ray.kill. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/named-actor-lifecycle.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/named-actor-lifecycle.png" width="160" alt="graph"></a> |
| 11 | [Reserve resources with a placement group](https://eugo.io/docs/ganymede/ray_patterns/core/11_placement-group/) | A placement group reserves two one-CPU bundles. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/placement-group.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/placement-group.png" width="160" alt="graph"></a> |
| 12 | [Actor with concurrency groups](https://eugo.io/docs/ganymede/ray_patterns/core/12_actor-concurrency-groups/) | The builder writes an actor class whose methods run in separate concurrency groups: up to four I/O calls at once, compute calls one at a time. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/actor-concurrency-groups.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/actor-concurrency-groups.png" width="160" alt="graph"></a> |
| 13 | [Graph inputs as notebook parameters](https://eugo.io/docs/ganymede/ray_patterns/core/13_input-parameters/) | Input nodes become typed variables at the top of the code. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/input-parameters.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/input-parameters.png" width="160" alt="graph"></a> |
| 14 | [Lazy DAG with bind() and InputNode](https://eugo.io/docs/ganymede/ray_patterns/core/14_bind-dag-inputs/) | The same graph style in bind mode: .bind() builds a lazy Ray DAG around an InputNode, and execute(x=5) runs it with a concrete input. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/bind-dag-inputs.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/bind-dag-inputs.png" width="160" alt="graph"></a> |

## Ray Data

Distributed datasets: read, transform, aggregate, write.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 15 | [Ray Data: range, map_batches, count](https://eugo.io/docs/ganymede/ray_patterns/data/15_data-pipeline/) | A three-step Ray Data pipeline: create a dataset, transform it in batches, and count the rows. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-pipeline.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-pipeline.png" width="160" alt="graph"></a> |
| 16 | [Ray Data: write Parquet](https://eugo.io/docs/ganymede/ray_patterns/data/16_data-write-parquet/) | Writes a dataset to a Parquet directory with SaveMode.OVERWRITE, so re-running the cell replaces the output. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-write-parquet.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-write-parquet.png" width="160" alt="graph"></a> |
| 17 | [Ray Data: groupby and aggregate](https://eugo.io/docs/ganymede/ray_patterns/data/17_data-groupby-aggregate/) | Groups rows by a key and computes Count and Sum per group with Ray Data built-in aggregations. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-groupby-aggregate.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-groupby-aggregate.png" width="160" alt="graph"></a> |
| 18 | [Ray Data: computed columns and expression filters](https://eugo.io/docs/ganymede/ray_patterns/data/18_data-expressions/) | with_column adds a computed column from col() and lit() expressions, and filter(expr=...) keeps the matching rows, with no Python UDF. *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-expressions.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-expressions.png" width="160" alt="graph"></a> |
| 19 | [Ray Data: join two datasets](https://eugo.io/docs/ganymede/ray_patterns/data/19_data-join/) | An inner join of two datasets on an id column. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-join.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-join.png" width="160" alt="graph"></a> |
| 20 | [Ray Data: train/test split](https://eugo.io/docs/ganymede/ray_patterns/data/20_data-train-test-split/) | train_test_split has two outputs; each one feeds its own count. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-train-test-split.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-train-test-split.png" width="160" alt="graph"></a> |
| 21 | [Ray Data: batch inference with an actor pool](https://eugo.io/docs/ganymede/ray_patterns/data/21_data-actor-pool-batch-inference/) | map_batches with a callable class and ActorPoolStrategy: each actor runs the expensive setup once and then processes many batches. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-actor-pool-batch-inference.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-actor-pool-batch-inference.png" width="160" alt="graph"></a> |
| 22 | [Ray Data: shuffle, repartition and sort](https://eugo.io/docs/ganymede/ray_patterns/data/22_data-shuffle-repartition-sort/) | A seeded random_shuffle, a repartition into four blocks and a descending sort, then take(5). | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-shuffle-repartition-sort.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-shuffle-repartition-sort.png" width="160" alt="graph"></a> |
| 23 | [Ray Data: from pandas and back](https://eugo.io/docs/ganymede/ray_patterns/data/23_data-pandas-roundtrip/) | Turns a pandas DataFrame into a Ray Dataset, adds a column row by row with map, and collects the result as a DataFrame again. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-pandas-roundtrip.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-pandas-roundtrip.png" width="160" alt="graph"></a> |
| 24 | [Ray Data: fit a StandardScaler preprocessor](https://eugo.io/docs/ganymede/ray_patterns/data/24_data-preprocessor/) | A Ray Data preprocessor learns column statistics in one pass (fit) and applies them (transform). *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-preprocessor.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-preprocessor.png" width="160" alt="graph"></a> |
| 25 | [Ray Data: read a catalog table](https://eugo.io/docs/ganymede/ray_patterns/data/25_data-catalog-table/) | A catalog node creates a DatabricksUnityCatalog client from an environment variable; the reader resolves the table through it. Needs Ray 2.58.0 or later: the catalog API is not in Ray 2.55.1 (the notebook shows the `read_unity_catalog` alternative for 2.55.1). *code only*, *experimental* | — | Mermaid diagram in the notebook |
| 26 | [Ray Data: batch LLM inference](https://eugo.io/docs/ganymede/ray_patterns/data/26_data-llm-batch/) | The llm transform builds a ray.data.llm processor around a vLLM engine and runs prompts through it as a dataset stage. *code only*, *experimental* | `ray[llm]` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/data-llm-batch.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/data-llm-batch.png" width="160" alt="graph"></a> |

## Ray Serve

Model serving: deployments, composition, ingress, scaling.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 27 | [Ray Serve: compose two deployments](https://eugo.io/docs/ganymede/ray_patterns/serve/27_serve-greeter-driver/) | A Greeter deployment is passed into a Driver deployment with .bind(); serve.run starts both as one application. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-greeter-driver.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-greeter-driver.png" width="160" alt="graph"></a> |
| 28 | [Ray Serve: replicas and per-replica resources](https://eugo.io/docs/ganymede/ray_patterns/serve/28_serve-replicas-and-options/) | A three-deployment pipeline where the classifier runs two replicas with half a CPU each and a cap on in-flight requests. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-replicas-and-options.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-replicas-and-options.png" width="160" alt="graph"></a> |
| 29 | [Ray Serve: autoscaling a deployment](https://eugo.io/docs/ganymede/ray_patterns/serve/29_serve-autoscaling/) | autoscaling_config lets Serve add replicas (here between 1 and 3) as the number of ongoing requests per replica grows; max_queued_requests sheds load beyond a limit. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-autoscaling.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-autoscaling.png" width="160" alt="graph"></a> |
| 30 | [Ray Serve: FastAPI ingress with a route prefix](https://eugo.io/docs/ganymede/ray_patterns/serve/30_serve-fastapi-ingress/) | A FastAPI app, built on each replica by a builder function, becomes the HTTP ingress of a deployment served under the /api route prefix. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-fastapi-ingress.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-fastapi-ingress.png" width="160" alt="graph"></a> |
| 31 | [Ray Serve: dynamic request batching](https://eugo.io/docs/ganymede/ray_patterns/serve/31_serve-dynamic-batching/) | The builder writes a deployment whose handler is wrapped in @serve.batch, so concurrent requests are grouped into one call. *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-dynamic-batching.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-dynamic-batching.png" width="160" alt="graph"></a> |
| 32 | [Ray Serve: model multiplexing](https://eugo.io/docs/ganymede/ray_patterns/serve/32_serve-model-multiplexing/) | One deployment serves many models: @serve.multiplexed loads a model by id on demand and keeps up to two per replica. *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-model-multiplexing.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-model-multiplexing.png" width="160" alt="graph"></a> |
| 33 | [Ray Serve: HTTP proxy settings and status](https://eugo.io/docs/ganymede/ray_patterns/serve/33_serve-http-options-and-status/) | An HTTP proxy config node starts Serve on 127.0.0.1:8123 before the app is deployed, and a status node reads serve.status() afterwards. *experimental* | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-http-options-and-status.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-http-options-and-status.png" width="160" alt="graph"></a> |
| 34 | [Ray Serve: gRPC ingress](https://eugo.io/docs/ganymede/ray_patterns/serve/34_serve-grpc-ingress/) | A gRPC ingress node adds a gRPC proxy on port 9000 with a servicer function; the deployment answers protobuf requests. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-grpc-ingress.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-grpc-ingress.png" width="160" alt="graph"></a> |
| 35 | [Ray Serve: an OpenAI-compatible LLM endpoint](https://eugo.io/docs/ganymede/ray_patterns/serve/35_serve-llm-openai-app/) | An LLM node builds an OpenAI-compatible app with ray.serve.llm: model id, model files on Hugging Face, accelerator type and autoscaling bounds. *code only* | `openai`, `ray[llm]` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/serve-llm-openai-app.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/serve-llm-openai-app.png" width="160" alt="graph"></a> |

## Ray Train

Distributed training with Torch, LightGBM and XGBoost. The trainer type is a setting of the Trainer node that the canvas does not draw, so the graphs for 36, 37 and 38 look the same.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 36 | [Ray Train: TorchTrainer over a dataset](https://eugo.io/docs/ganymede/ray_patterns/train/36_train-torch/) | A TorchTrainer runs a training loop on one CPU worker and reads its shard of a Ray Dataset. | `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/train-torch.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/train-torch.png" width="160" alt="graph"></a> |
| 37 | [Ray Train: LightGBMTrainer](https://eugo.io/docs/ganymede/ray_patterns/train/37_train-lightgbm/) | A LightGBMTrainer runs a gradient-boosted tree training loop on a Ray Dataset shard. | `lightgbm` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/train-lightgbm.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/train-lightgbm.png" width="160" alt="graph"></a> |
| 38 | [Ray Train: XGBoostTrainer](https://eugo.io/docs/ganymede/ray_patterns/train/38_train-xgboost/) | An XGBoostTrainer runs a gradient-boosted tree training loop on a Ray Dataset shard. | `xgboost` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/train-xgboost.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/train-xgboost.png" width="160" alt="graph"></a> |
| 39 | [Ray Train: validation data, run config and results](https://eugo.io/docs/ganymede/ray_patterns/train/39_train-validation-and-results/) | Two workers train with a train and a validation dataset, a train_loop_config dict and a RunConfig; result nodes pull the final metrics and the run directory out of the Result. | `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/train-validation-and-results.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/train-validation-and-results.png" width="160" alt="graph"></a> |

## Ray Tune

Hyperparameter search, schedulers and stoppers.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 40 | [Ray Tune: grid search with ASHA early stopping](https://eugo.io/docs/ganymede/ray_patterns/tune/40_tune-asha/) | A Tuner sweeps the learning rate of a TorchTrainer over a grid, and the ASHA scheduler stops weak trials early. | `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/tune-asha.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/tune-asha.png" width="160" alt="graph"></a> |
| 41 | [Ray Tune: Optuna search](https://eugo.io/docs/ganymede/ray_patterns/tune/41_tune-optuna/) | The same trainer tuned with OptunaSearch sampling the learning rate from a uniform range. | `optuna`, `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/tune-optuna.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/tune-optuna.png" width="160" alt="graph"></a> |
| 42 | [Ray Tune: median stopping, a stopper and the ResultGrid](https://eugo.io/docs/ganymede/ray_patterns/tune/42_tune-stopper-and-result-grid/) | Two grid trials under the median stopping rule and a MaximumIteration stopper; ResultGrid nodes pull a DataFrame of trial results and the error count. *experimental* | `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/tune-stopper-and-result-grid.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/tune-stopper-and-result-grid.png" width="160" alt="graph"></a> |

## Across libraries

Programs that combine several Ray libraries.

| # | Pattern | What it shows | Extra packages | Graph |
|---|---|---|---|---|
| 43 | [One program across Core, Data, Train and Tune](https://eugo.io/docs/ganymede/ray_patterns/cross/43_core-data-train-tune/) | A Core task, a Data pipeline, a standalone Train run and a Tune sweep in one graph; the builder emits them in that order as one program. | `torch` | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/core-data-train-tune.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/core-data-train-tune.png" width="160" alt="graph"></a> |
| 44 | [Export as a script and submit it as a Ray Job](https://eugo.io/docs/ganymede/ray_patterns/cross/44_export-script-and-job/) | The builder exports a graph as a standalone Python script (functions inlined, an if __name__ == "__main__" entry point) and writes a shell script that submits it with ray job submit. | — | <a href="https://eugo.io/docs/ganymede/ray_patterns/images/export-script-and-job.png"><img src="https://eugo.io/docs/ganymede/ray_patterns/images/export-script-and-job.png" width="160" alt="graph"></a> |

## Notes

- *Experimental* marks graphs that use a node the builder lists in its Experimental section, or a Ray API that Ray 2.55.1 marks as alpha or beta. The Ray code they generate ran on Ray 2.55.1 unless the notebook is also marked *code only*.
- A grey *alpha* badge on a node in a picture means the Ray API behind that node is alpha in Ray 2.55.1 (for example `Dataset.with_column` in 18 and the `StandardScaler` preprocessor in 24). Those graphs are marked *experimental*.
- *Code only* notebooks need a GPU, a model-serving engine or an external data catalog, and the catalog pattern (25) also needs a Ray release newer than 2.55.1 (2.58.0 or later). Their code is shown without outputs.
- Ray Serve 2.55.1 does not work with protobuf 7: it uses `FieldDescriptor.label`, which protobuf 7 removed. Keep `protobuf<7`, as in the install line above.
- On Ray 2.55.1, `@serve.ingress(app)` with a FastAPI app object fails to pickle with current FastAPI releases. Pass a builder function that creates the app instead, as notebook 30 does.
- Some pictures cannot show everything: a node's caption is the builder's shorthand (for example `ds.llm()`), options such as `num_returns` are not drawn, and the layout may place a graph's inputs in a different order from the code. The caption under each picture and the walkthrough map every node to the real Ray calls.
- Ray, Ray Core, Ray Data, Ray Serve, Ray Train and Ray Tune are part of the open-source [Ray](https://github.com/ray-project/ray) project.

## Sections

- [Ray Core](https://eugo.io/docs/ganymede/ray_patterns/core/): 14 notebooks. Tasks, actors, objects and scheduling.
- [Ray Data](https://eugo.io/docs/ganymede/ray_patterns/data/): 12 notebooks. Distributed datasets: read, transform, aggregate, write.
- [Ray Serve](https://eugo.io/docs/ganymede/ray_patterns/serve/): 9 notebooks. Model serving: deployments, composition, ingress, scaling.
- [Ray Train](https://eugo.io/docs/ganymede/ray_patterns/train/): 4 notebooks. Distributed training with Torch, LightGBM and XGBoost. The trainer type is a setting of the Trainer node that the canvas does not draw, so the graphs for 36, 37 and 38 look the same.
- [Ray Tune](https://eugo.io/docs/ganymede/ray_patterns/tune/): 3 notebooks. Hyperparameter search, schedulers and stoppers.
- [Across libraries](https://eugo.io/docs/ganymede/ray_patterns/cross/): 2 notebooks. Programs that combine several Ray libraries.
