Convert cluster compute config in release test to Kuberay compute config#53681
Merged
Convert cluster compute config in release test to Kuberay compute config#53681
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a helper function to convert the cluster compute config into the Kuberay compute config format used by the Kuberay service. Key changes include:
- Addition of convert_cluster_compute_to_kuberay_compute_config in util.py.
- A corresponding unit test in test_util.py to validate the conversion logic.
- Inclusion of the new test in the Bazel BUILD file to execute the unit test.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| release/ray_release/util.py | Added helper function for compute config conversion. |
| release/ray_release/tests/test_util.py | Added unit test validating the conversion function. |
| release/BUILD.bazel | Updated Bazel target to include the new unit test. |
release/ray_release/util.py
Outdated
Comment on lines
+228
to
+229
| if worker_node_type.get("resources", {}): | ||
| worker_node_config["resources"] = worker_node_type.get("resources", {}) |
There was a problem hiding this comment.
[nitpick] Consider storing the result of worker_node_type.get('resources', {}) in a local variable before the if-statement to avoid duplicate lookups and improve code readability.
Suggested change
| if worker_node_type.get("resources", {}): | |
| worker_node_config["resources"] = worker_node_type.get("resources", {}) | |
| worker_node_resources = worker_node_type.get("resources", {}) | |
| if worker_node_resources: | |
| worker_node_config["resources"] = worker_node_resources |
aslonnie
approved these changes
Jun 10, 2025
Contributor
Author
should be fixed now |
elliot-barn
pushed a commit
that referenced
this pull request
Jun 18, 2025
…fig (#53681) The schema of compute config that Kuberay service takes in is currently a bit different from the schema of cluster compute in release tests. This is a helper function built to convert the cluster compute into Kuberay compute config that eventually gets sent into Kuberay service --------- Signed-off-by: kevin <kevin@anyscale.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 2, 2025
…fig (#53681) The schema of compute config that Kuberay service takes in is currently a bit different from the schema of cluster compute in release tests. This is a helper function built to convert the cluster compute into Kuberay compute config that eventually gets sent into Kuberay service --------- Signed-off-by: kevin <kevin@anyscale.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The schema of compute config that Kuberay service takes in is currently a bit different from the schema of cluster compute in release tests. This is a helper function built to convert the cluster compute into Kuberay compute config that eventually gets sent into Kuberay service