<#1126 feat: set GPU extended_resources for Ray he...
# flyte-github
a
#1126 feat: set GPU extended_resources for Ray head and worker groups Pull request opened by pingsutw Summary • Populate
extended_resources
on the Ray
HeadGroupSpec
and each
WorkerGroupSpec
from their
requests
, so GPU accelerator (device/partition/device-class) and shared-memory configuration is propagated to KubeRay. • Export
get_proto_extended_resources
from
flyte.extend
so the Ray plugin (and other plugins) can build the proto
ExtendedResources
. • Add unit tests for the Ray plugin (new
plugins/ray/tests/
) covering accelerator propagation. Test plan •
uv run --project plugins/ray pytest plugins/ray/tests/test_task.py -v
• Tests verify: • Head node with
Resources(gpu="T4:1")
→
head_group_spec.extended_resources.gpu_accelerator.device == "nvidia-tesla-t4"
. • Worker group with
Resources(gpu="A100:2")
→
worker_group_spec[0].extended_resources.gpu_accelerator.device == "nvidia-tesla-a100"
. • CPU/memory-only requests leave
extended_resources
unset on both head and worker specs. flyteorg/flyte-sdk