Skip to content

Commit

Permalink
Update Ray documentation to reflect pod template updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
  • Loading branch information
Sovietaced committed Feb 2, 2025
1 parent 02e0dc9 commit 328138d
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion examples/ray_plugin/ray_plugin/ray_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ def ray_task(n: int) -> typing.List[int]:

# %% [markdown]
# :::{note}
# The `Resources` section here is utilized to specify the resources allocated to the worker nodes.
# By default, the `Resources` section here is utilized to specify the resources allocated to the head and nodes as well
# as the submitter pod.
# :::
#
# Lastly, define a workflow to call the Ray task.
Expand All @@ -102,6 +103,27 @@ def ray_workflow(n: int) -> typing.List[int]:
if __name__ == "__main__":
print(ray_workflow(n=10))

# %% [markdown]
# ## Ray Head & Worker Node Customization
#
# By default, the Ray plugin will base much of the configuration for the Ray head and worker node pods in the Ray
# cluster based on the Ray job submitter pod derived from the task decorator. In some cases it is useful to customize
# the Ray head and worker node pods and the Ray plugin supports this with optional `k8s_pod` arguments for both the
# {py:class}`~flytekitplugins.ray.HeadNodeConfig` and {py:class}`~flytekitplugins.ray.WorkerNodeConfig` classes.
#
# This argument allows users to pass in a completely customized pod template. The Ray plugin will use the following
# configurations if there are defined in the pod template:
#
# - Container resource requests (can also be set with the `requests` helper method)
# - Container resource limits (can also be set with the `limits` helper method)
# - Pod runtime class name
#
# :::{note}
# Containers in the pod template must match the target container name for the Ray cluster node (ie. ray-head or
# ray worker). Otherwise, the customized configuration will not take effect.
# :::
# %%

# %% [markdown]
# ## Troubleshoot
#
Expand Down

0 comments on commit 328138d

Please sign in to comment.