Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test][Autoscaler][2/n] Add Ray Autoscaler e2e tests for GPU workers #2181

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

rueian
Copy link
Contributor

@rueian rueian commented Jun 6, 2024

Why are these changes needed?

Continue the work on #2173 for GPU e2e tests.

Related issue number

#2173 for more details.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

parser = argparse.ArgumentParser()
parser.add_argument('name')
parser.add_argument('--num-cpus', type=float, default=1)
parser.add_argument('--num-gpus', type=float, default=0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argparse allows us to pass --num-gpus later in tests.

@@ -73,5 +80,18 @@ func TestRayClusterAutoscaler(t *testing.T) {
ExecPodCmd(test, headPod, common.RayHeadContainer, []string{"python", "/home/ray/test_scripts/terminate_detached_actor.py", "actor2"})
test.Eventually(RayCluster(test, rayCluster.Namespace, rayCluster.Name), TestTimeoutMedium).
Should(WithTransform(RayClusterDesiredWorkerReplicas, Equal(int32(0))))

// Create a detached gpu actor, and a worker in the "gpu-group" should be created.
ExecPodCmd(test, headPod, common.RayHeadContainer, []string{"python", "/home/ray/test_scripts/create_detached_actor.py", "gpu_actor", "--num-gpus=1"})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We pass --num-gpus=1 to the script to change the actor resource requirements.

@rueian rueian marked this pull request as ready for review June 6, 2024 15:01
@kevin85421 kevin85421 self-assigned this Jun 7, 2024
@kevin85421 kevin85421 self-requested a review June 7, 2024 21:02
@kevin85421 kevin85421 merged commit 40a946a into ray-project:master Jun 9, 2024
24 checks passed
@kevin85421 kevin85421 mentioned this pull request Jun 9, 2024
15 tasks
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