-
Notifications
You must be signed in to change notification settings - Fork 7k
[Core] Ensure Ray vendored libraries only be visible and used by Ray internal #52905
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
Conversation
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
python/ray/__init__.py
Outdated
| # Save the modules in Ray's private namespace | ||
| sys.modules["ray._private.psutil"] = psutil | ||
| sys.modules["ray._private.setproctitle"] = setproctitle | ||
| sys.modules["ray._private.colorama"] = colorama |
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.
Does this work? For files inside psutil, if they import each other, will they import the public one instead of the thirdparty_files one?
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.
we are testing and it should work, let me check. I just remove psutil as there are too many places that use this. If this work we can check if we should refactor all or some libs that into internal, i.e. numpy, traceback,, time. Or we just modify the libs that tends to easily have issues? What do you think?
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.
Yea, I'm not sure if that works. The way I'm aware is checking in the source code directly and change the import path of all the files. Something like https://github.com/pradyunsg/vendoring does.
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.
@Bye-legumes does this approach work?
|
Thanks for working on this one! |
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: Zhaoch <c233zhao@uwaterloo.ca>
|
I asked chatgpt, seems changing sys.modules is considered a discouraged way of vendoring. Instead, we should check in the source code directly (see. |
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
Why are these changes needed?
fix issue #52763
Related issue number
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.