8000 [core] Clean up `test_locality_aware_leasing_borrowed_objects` by edoakes · Pull Request #54086 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[core] Clean up test_locality_aware_leasing_borrowed_objects #54086

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
merged 5 commits into from
Jun 25, 2025

Conversation

edoakes
Copy link
Collaborator
@edoakes edoakes commented Jun 25, 2025

Clean up test_locality_aware_leasing_borrowed_objects to use public API to schedule to specific nodes and make the test behavior a bit more clear.

edoakes added 2 commits June 25, 2025 09:58
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jun 25, 2025
@edoakes edoakes requested a review from a team June 25, 2025 15:03
@edoakes edoakes enabled auto-merge (squash) June 25, 2025 15:03
edoakes added 2 commits June 25, 2025 10:04
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@github-actions github-actions bot disabled auto-merge June 25, 2025 15:06
# g will run on head, f_obj will be borrowed by head, and we confirm that
# h(f_obj) is scheduled onto worker, the node that has f_obj.
@ray.remote(num_cpus=0)
def borrower(o: List[ray.ObjectRef]) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

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

qq: why we need a list as input while we only pass in a single element list

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is intentional so that the task is a "borrower" of the reference itself. If it took the object ref, that would be resolved to its underlying value before the task was invoked.

@edoakes edoakes merged commit 886b73e into ray-project:master Jun 25, 2025
5 checks passed
minerharry pushed a commit to minerharry/ray that referenced this pull request Jun 27, 2025
…roject#54086)

Clean up `test_locality_aware_leasing_borrowed_objects` to use public
API to schedule to specific nodes and make the test behavior a bit more
clear.

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.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.

2 participants
0