[Core][Label scheduling 3/n] Implement node label scheduling strategy#37339
[Core][Label scheduling 3/n] Implement node label scheduling strategy#37339jjyao merged 1 commit intoray-project:masterfrom
Conversation
819e95a to
e8fa814
Compare
e8fa814 to
4088418
Compare
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I don't think we need to score soft match: you either match the entire expressions or not. There is no partial match. We only need to score after we support OR with weights.
There was a problem hiding this comment.
It's okay. We can add it if necessary in the future.
4088418 to
0ddeee6
Compare
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/common/task/task_spec.h
Outdated
There was a problem hiding this comment.
The hash function should guarantee that if two label scheduling strategies are the same, they must have the same hash value. Can we actually examine each field of NodeLabelSchedulingStrategy like what we do for other scheduling strategies?
There was a problem hiding this comment.
Let's at least change to SerializeAsString for now.
There was a problem hiding this comment.
Because SerializeAsString is unsafe for hash. I think just use DebugString for now.
0ddeee6 to
25ce51f
Compare
src/ray/common/task/task_spec.h
Outdated
There was a problem hiding this comment.
The hash function should guarantee that if two label scheduling strategies are the same, they must have the same hash value. Can we actually examine each field of NodeLabelSchedulingStrategy like what we do for other scheduling strategies?
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
25ce51f to
c8c71fa
Compare
That's fine. I'd prefer to create a new PR for this modification. The struct has quite a few member variables, so the code will be substantial. I'll also write some test cases. |
src/ray/common/task/task_spec.h
Outdated
There was a problem hiding this comment.
Let's at least change to SerializeAsString for now.
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
src/ray/raylet/scheduling/policy/node_label_scheduling_policy.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: 稚鱼 <554538252@qq.com> Signed-off-by: LarryLian <554538252@qq.com>
c8c71fa to
e367a4b
Compare
…ray-project#37339) Signed-off-by: LarryLian <554538252@qq.com> Signed-off-by: NripeshN <nn2012@hw.ac.uk>
…ray-project#37339) Signed-off-by: LarryLian <554538252@qq.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
…ray-project#37339) Signed-off-by: LarryLian <554538252@qq.com> Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
Implement node label scheduling strategy
Related issue number
#34894
(P2)Implement the node affinity with labels interface in Python and transparently transmit it to the CoreWorker.
(P2)Implement the node affinity with labels scheduling policy.
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.