Skip to content
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

[Serve]Fix classloader bug in Java Deployment #27899

Merged
merged 2 commits into from
Aug 16, 2022

Conversation

liuyang-my
Copy link
Contributor

Why are these changes needed?

We have encountered java.lang.ClassNotFoundException when deploying Java Ray Serve deployments. The property ray.job.code-search-path which specifies the search path of user's classes is not working. The reason is that ray.job.code-search-path is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with AppClassLoader. We need to change the classloader used to construct user classes to the one in Ray context.

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

… classloader in ray context to load user class.

Signed-off-by: liuyang <[email protected]>
Signed-off-by: liuyang <[email protected]>
@liuyang-my liuyang-my added bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue labels Aug 16, 2022
@jovany-wang jovany-wang merged commit 1c4b387 into ray-project:master Aug 16, 2022
@jovany-wang jovany-wang deleted the serve-java-fix-classloader branch August 16, 2022 07:22
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.

Signed-off-by: Stefan van der Kleij <[email protected]>
JiahaoYao pushed a commit to JiahaoYao/ray that referenced this pull request Aug 21, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.
JiahaoYao pushed a commit to JiahaoYao/ray that referenced this pull request Aug 22, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.
JiahaoYao pushed a commit to JiahaoYao/ray that referenced this pull request Aug 22, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.
JiahaoYao pushed a commit to JiahaoYao/ray that referenced this pull request Aug 30, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.
pcmoritz pushed a commit to pcmoritz/ray-1 that referenced this pull request Aug 31, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.

Signed-off-by: Philipp Moritz <[email protected]>
ArturNiederfahrenhorst pushed a commit to ArturNiederfahrenhorst/ray that referenced this pull request Sep 1, 2022
We have encountered `java.lang.ClassNotFoundException` when deploying Java Ray Serve deployments. The property `ray.job.code-search-path` which specifies the search path of user's classes is not working. The reason is that `ray.job.code-search-path` is loaded in an independent classloader in Ray context, but Serve Replica initialized user class with `AppClassLoader`. We need to change the classloader used to construct user classes to the one in Ray context.

Signed-off-by: Artur Niederfahrenhorst <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't serve Ray Serve Related Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants