Skip to content

[core][gpu-objects] Fix test_gpu_objects_nccl.py #53874

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

Merged

Conversation

kevin85421
Copy link
Member

@kevin85421 kevin85421 commented Jun 17, 2025

Why are these changes needed?

#53871

  • CI error:
    image

Related issue number

Closes #53871

Checks

image
  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com>
@kevin85421 kevin85421 marked this pull request as ready for review June 17, 2025 05:27
@Copilot Copilot AI review requested due to automatic review settings June 17, 2025 05:27
@kevin85421 kevin85421 added the go add ONLY when ready to merge, run all tests label Jun 17, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses an issue with the NCCL GPU objects test by modifying resource allocation in the actor decorator and adjusting test parameters.

  • Updated the remote decorator to explicitly set CPU usage to zero.
  • Added parameterization to ensure the test runs with two GPUs.
Comments suppressed due to low confidence (2)

python/ray/tests/test_gpu_objects_nccl.py:8

  • Consider adding a brief comment explaining the rationale for setting 'num_cpus' to 0, to clarify the resource usage for this GPU-specific actor.
@ray.remote(num_gpus=1, num_cpus=0)

python/ray/tests/test_gpu_objects_nccl.py:18

  • Ensure that the CI environment or local setups are configured to support at least 2 GPUs to avoid false negatives in this test.
@pytest.mark.parametrize("ray_start_regular", [{"num_gpus": 2}], indirect=True)

Copy link
Contributor

@stephanie-wang stephanie-wang left a comment

Choose a reason for hiding this comment

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

Thanks!

@stephanie-wang stephanie-wang merged commit 3ee4639 into ray-project:master Jun 17, 2025
5 checks passed
elliot-barn pushed a commit that referenced this pull request Jun 18, 2025
#53871

* CI error:

![image](https://github.com/user-attachments/assets/9c4d533d-9d09-4574-ae3d-42ef03c3be51)

Closes #53871

Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
rebel-scottlee pushed a commit to rebellions-sw/ray that referenced this pull request Jun 21, 2025
ray-project#53871

* CI error:

![image](https://github.com/user-attachments/assets/9c4d533d-9d09-4574-ae3d-42ef03c3be51)

Closes ray-project#53871

Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com>
Signed-off-by: Scott Lee <scott.lee@rebellions.ai>
minerharry pushed a commit to minerharry/ray that referenced this pull request Jun 27, 2025
elliot-barn pushed a commit that referenced this pull request Jul 2, 2025
#53871

* CI error:

![image](https://github.com/user-attachments/assets/9c4d533d-9d09-4574-ae3d-42ef03c3be51)

Closes #53871

Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI test linux://python/ray/tests:test_gpu_objects_nccl is consistently_failing
2 participants