-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Change core worker C++ namespace to ray::core #17610
Conversation
e916fab
to
2d3b17f
Compare
Also need to deal with such classes:
|
this PR only handles core worker code to avoid a huge PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
a93d02b
to
8173087
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you list the results of git grep ray:: src/ray/core_worker
? I'd like to know where the remaining usages of ray::
prefix are in core worker code.
@@ -21,6 +21,8 @@ | |||
namespace ray { | |||
namespace api { | |||
|
|||
using ray::core::WorkerType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we avoid using
in header files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header is not exposed to users. So I think it's fine. we should avoid using in api headers.
src/ray/core_worker/core_worker.cc
Outdated
@@ -26,20 +26,20 @@ | |||
#include "ray/util/util.h" | |||
|
|||
namespace ray { | |||
namespace core { | |||
namespace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
@@ -24,6 +24,9 @@ | |||
#include "ray/common/ray_object.h" | |||
#include "ray/core_worker/core_worker.h" | |||
|
|||
using namespace ray; | |||
using namespace ray::core; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change!
Since we already have |
@kfstorm I tried changing everything, but that's too complex. I'd prefer keeping |
@raulchen Do you plan to rename |
we'll try changing other parts after releasing C++ worker. |
* [Core] Support ConcurrentGroup part1 (#16795) * Core change and Java change. * Fix void call. * Address comments and fix cases. * Fix asyncio * Change core worker C++ namespace to ray::core (#17610) * [C++ Worker] Replace `Ray::xxx` with `ray::xxx` and update namespaces (#17388) * [core] make 'PopWorker' to be an async function (#17202) * make 'PopWorker' to be an async function * pop worker async works * fix * address comments * bugfix * fix cluster_task_manager_test * fix * bugfix of detached actor * address comments * fix * address comments * fix aioredis * Revert "fix aioredis" This reverts commit 041b983. * bug fix * fix * fix test_step_resources test * format * add unit test * fix * add test case PopWorkerStatus * address commit * fix lint * address comments * add python test * address comments * make an independent function * Update test_basic_3.py Co-authored-by: Hao Chen <chenh1024@gmail.com> Co-authored-by: Qing Wang <kingchin1218@gmail.com> Co-authored-by: Hao Chen <chenh1024@gmail.com> Co-authored-by: qicosmos <383121719@qq.com> Co-authored-by: SongGuyang <guyang.sgy@antfin.com>
Why are these changes needed?
In order to avoid namespace conflicts between ray core code and C++ worker code, we wanted to change the namespace of all ray core code to "ray::core". However, this turned out to be too complex.
Thus, this PR only changes core worker namespace, which should resolve most conflicts with the C++ worker.
Related issue number
#17388
Checks
scripts/format.sh
to lint the changes in this PR.