Skip to content

Conversation

@jld-adriano
Copy link

Why are the changes needed?

This PR enables long-lived Ray clusters in Flyte by serializing the address field from RayJobConfig to flyteidl. When address is set, flytepropeller will use ClusterSelector mode instead of creating a new ephemeral RayCluster, allowing faster iteration during development.

Previously, the address field in RayJobConfig was only used for ray.init() inside the task container and was not serialized to flyteidl, so flytepropeller had no way to know about it.

What changes were proposed in this pull request?

  1. Add address parameter to RayJob.__init__ in models.py
  2. Add address property to RayJob class
  3. Serialize address in to_flyte_idl() method
  4. Deserialize address in from_flyte_idl() method
  5. Pass address from RayJobConfig to RayJob in task.py's get_custom() method

How was this patch tested?

Manual review of serialization logic.

Important: This PR requires the companion PR in exa-labs/flyte that adds the address field to flyteidl/plugins/ray.proto and implements the cluster selector logic in flytepropeller.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

  • exa-labs/flyte PR (adds address field to ray.proto and implements cluster selector logic in flytepropeller)

Human Review Checklist

  • Verify the companion flyte PR has been merged or will be merged together with this
  • Confirm empty string handling (address if self.address else "") is correct for protobuf string fields
  • Consider if unit tests should be added for the address serialization

Link to Devin run: https://app.devin.ai/sessions/91929162dbc241d8a83ef3c18aeb9aba
Requested by: adriano@exa.ai (@jld-adriano)

Add address field serialization to RayJob model so it flows from flytekit
to flytepropeller. When address is set, flytepropeller will use ClusterSelector
mode instead of creating a new RayCluster.

Changes:
- Add address parameter to RayJob.__init__
- Add address property to RayJob
- Serialize address in to_flyte_idl()
- Deserialize address in from_flyte_idl()
- Pass address from RayJobConfig to RayJob in task.py

Author: Devin AI (claude-sonnet-4-20250514)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants