Skip to content

Commit

Permalink
Cleanup ray docs to reflect current functionality
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Parraga <[email protected]>
  • Loading branch information
Sovietaced committed Oct 27, 2024
1 parent 8ef4220 commit 970d70e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
24 changes: 0 additions & 24 deletions examples/ray_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,6 @@ To enable the plugin in the backend, refer to the instructions provided in the {

## Implementation details

### Submit a Ray job to existing cluster

```{eval-rst}
.. testcode:: ray-quickstart-1
import ray
from flytekit import task
from flytekitplugins.ray import RayJobConfig
@ray.remote
def f(x):
return x * x
@task(
task_config=RayJobConfig(
address=<RAY_CLUSTER_ADDRESS>
runtime_env={"pip": ["numpy", "pandas"]}
)
)
def ray_task() -> typing.List[int]:
futures = [f.remote(i) for i in range(5)]
return ray.get(futures)
```

### Create a Ray cluster managed by Flyte and run a Ray Job on the cluster

```{eval-rst}
Expand Down
5 changes: 2 additions & 3 deletions examples/ray_plugin/ray_plugin/ray_example.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# %% [markdown]
# # Running Ray Tasks
#
# The Ray task offers the capability to execute a Ray job either on a pre-existing Ray cluster
# or by creating a new Ray cluster using the Ray operator.
# The Ray task offers the capability to execute a Ray job on a dynamically created Ray cluster using the Ray operator.
#
# :::{Warning}
# **Version Compatibility**
Expand Down Expand Up @@ -51,7 +50,7 @@ def f(x):
# Here's a breakdown of the parameters:
#
# - `ray_start_params`: These are the [parameters](https://docs.ray.io/en/latest/ray-core/api/doc/ray.init.html)
# used in the Ray `init` method, encompassing the address and object-store-memory settings.
# used in the Ray `init` method, encompassing the object-store-memory settings.
# - `replicas`: Specifies the desired number of replicas for the worker group. The default is 1.
# - `group_name`: A RayCluster can host multiple worker groups, each differentiated by its name.
# - `runtime_env`: The [runtime environment](https://docs.ray.io/en/latest/ray-core/handling-dependencies.html#runtime-environments)
Expand Down

0 comments on commit 970d70e

Please sign in to comment.