Commit 9697d7a
docsy(v2): document Ray autoscaler_options (AutoscalerOptionsConfig) (#1463)
* docs: document Ray autoscaler_options / AutoscalerOptionsConfig
The Ray page documented enable_autoscaling, the on/off switch, but nothing that
configures it: no autoscaler_options row and no mention of
AutoscalerOptionsConfig anywhere. The generated reference already carries the
class (content/api-reference/integrations/ray/autoscaleroptionsconfig.md, added
by regen #1442), so only the narrative lagged. Its generated parameter table has
empty descriptions, since the generator does not parse the docstring field list,
which is why the narrative table is worth having.
New in v2.6.1: autoscaler_options has 0 occurrences in
v2.6.0:plugins/ray/src/flyteplugins/ray/task.py and 4 in v2.6.1.
Three behaviors documented because they are not inferable from the signature:
- autoscaler_options does not enable autoscaling. The Go plugin sets
EnableInTreeAutoscaling and AutoscalerOptions as independent fields on the
RayCluster spec (flyteorg/flyte ray.go:267-268), and KubeRay creates the
sidecar only when in-tree autoscaling is on, so options alone do nothing.
- Unset fields keep KubeRay defaults rather than being zeroed:
buildAutoscalerOptions applies idle_timeout_seconds only when > 0 and
upscaling_mode only when not UNSPECIFIED (ray.go:208-236).
- resources takes tuples for request/limit pairs.
Upscaling mode uses the SDK spelling (CONSERVATIVE), not the KubeRay string the
plugin maps it to ("Conservative").
Must rebase onto #1458 before merge: it is editing the same section of this page.
Co-Authored-By: docsy <docsy@union.ai>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
* docs: correct two false claims about autoscaler_options
The "unset keeps the KubeRay default" sentence was false for resources.
buildAutoscalerOptions assigns Resources inside an `err == nil` guard that
cannot fail: ToK8sResourceRequirements(nil) returns a non-nil empty struct
with a nil error (utils.go:53-55), so Resources is always non-nil whenever
autoscaler_options is passed. KubeRay then takes the replace branch at
pod.go:730-731 and overwrites its 500m/512Mi request and limit defaults
wholesale. env is assigned unguarded too, but KubeRay appends it behind a
len > 0 check (pod.go:739-740), so an empty env really is a no-op.
The upscaling_mode table listed four graded options. Ray maps DEFAULT and
AGGRESSIVE to the same upscaling_speed of 1000 and calls the second branch
redundant in its own source (autoscaling_config.py:107-116). UNSPECIFIED
never reaches the CR: ray.go:143 drops it. Only CONSERVATIVE differs, at
upscaling_speed 1, which caps a scale-up step at the current node count
rather than imposing a ceiling.
Co-Authored-By: docsy <docsy@union.ai>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
* docs: make the autoscaler snippet runnable and state the idle timeout default
The block opens with an import line, so it reads as self-contained, but
flyte.Resources had nothing importing flyte. Matches the convention used
by the reusable-cluster snippet further down the page.
idle_timeout_seconds defaults to 60 in KubeRay (raycluster_types.go:226-228,
v1.6.2). An explicit 0 does not disable idle removal: buildAutoscalerOptions
guards the assignment on `> 0` (ray.go:140), so a 0 is dropped and the
KubeRay default applies.
Co-Authored-By: docsy <docsy@union.ai>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
* docs: import flyte in the Ray configuration snippet too
Pre-existing, not introduced here, but fixing only the autoscaler snippet
left the page with two import-opening blocks where one imported flyte and
one did not. This block opens with an import line and calls
flyte.TaskEnvironment, so it has the same defect.
The page rule is now uniform: a block that opens with imports and uses
flyte.* imports flyte. The three blocks that open mid-expression are
fragments by design and are left alone.
Co-Authored-By: docsy <docsy@union.ai>
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
---------
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
Co-authored-by: docsy <docsy@union.ai>1 parent 0cb254d commit 9697d7a
1 file changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
121 | 157 | | |
122 | 158 | | |
123 | 159 | | |
| |||
0 commit comments