Skip to content

Conversation

@Bye-legumes
Copy link
Contributor

Why are these changes needed?

fix issue #52763

Related issue number

Checks

  • 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 :(

Bye-legumes and others added 7 commits May 9, 2025 18:08
Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
@zhaoch23 zhaoch23 requested a review from a team as a code owner May 12, 2025 16:52
Comment on lines 65 to 68
# 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
Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator

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?

@jjyao
Copy link
Collaborator

jjyao commented May 12, 2025

Thanks for working on this one!

Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
Signed-off-by: zhilong <zhilong.chen@mail.mcgill.ca>
@hainesmichaelc hainesmichaelc added the community-contribution Contributed by the community label May 12, 2025
zhaoch23 added 2 commits May 12, 2025 21:12
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
@masoudcharkhabi masoudcharkhabi added core Issues that should be addressed in Ray Core stability labels May 12, 2025
zhaoch23 added 13 commits May 13, 2025 16:52
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: 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: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
zhaoch23 and others added 5 commits May 15, 2025 15:54
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
zhaoch23 added 2 commits May 23, 2025 19:51
Signed-off-by: zhaoch23 <c233zhao@uwaterloo.ca>
Signed-off-by: Zhaoch <c233zhao@uwaterloo.ca>
@jjyao jjyao added the go add ONLY when ready to merge, run all tests label Jun 2, 2025
@jjyao
Copy link
Collaborator

jjyao commented Jun 2, 2025

I asked chatgpt, seems changing sys.modules is considered a discouraged way of vendoring. Instead, we should check in the source code directly (see. ray/_private/thirdparty). I'm having a PR for setproctitle (#53471). Could you open a PR for colorama to check in it's source code to ray/_private/thirdparty. It should be straightforward since it's a python only library.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

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.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jun 17, 2025
@github-actions
Copy link

github-actions bot commented Jul 1, 2025

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

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!

@github-actions github-actions bot closed this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests stability stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants