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
FEATURE: possibility to define global Classload for ND4J #8972
Conversation
4edf450
to
2b87007
Compare
@hosuaby hey sorry about this. I'm just getting to some of these, do you mind updating? I understand if you can't, otherwise we can get this merged. |
Hey, sorry this is late. Could you modify it to use the nd4j class loader? Otherwise, this seems legit. Sorry for the late response! |
2b87007
to
101701b
Compare
Hello, @agibsonccc :) |
Hello, @agibsonccc . I think I undestood what you wanna say. My mistake, I have better to explain my plan. This PR is the first part of work concerning #8712. It provides ability to define classloader for ND4J. For DL4J I would like to have a separate class The reasons I wanna to keep two classloaders separate:
So, my plan is, if this PR is approved, I make immediately the second one with Tell me what you think about. |
...d4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/factory/Nd4jBackend.java
Show resolved
Hide resolved
8142b4f
to
0af171d
Compare
Hello, @agibsonccc |
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.
Minor nit
@hosuaby minor nit then I think we can merge this. Thanks! |
@agibsonccc Ok. Do not hesitate to ask any change! |
@hosuaby think you could get this over the line? I think we can merge this soon. |
Signed-off-by: hosuaby <alexei.klenin@gmail.com>
0af171d
to
29cd68b
Compare
@agibsonccc done |
I didn't test it, but it looks fine. |
@agibsonccc Thanks! |
…g4j#8972) Signed-off-by: hosuaby <alexei.klenin@gmail.com>
This PR is related to #8712. This issue is talking about the need to have a possibility to provide class loader for method
Class.forName
. Author mention only classWordVectorSerializer
fromdeeplearning-nlp
. But the problem is more general. We need to have possibility to chose classloader used by ND4J and Deeplearning4j.This PR is a first part of the work. I added a new class
ND4JClassLoading
that gives possibility to used to provide his own classloader used byClass.forName
andServiceLoader.load
. And I replaced all call to those methods by calls to this new class. I hope I forgot nothing.There will be a second part of this work in anouther PR, concerning Dl4j. Both PR will be inderpendent.