-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MXNet for Scala 2.12 and 2.13 #18655
Comments
I would like to contribute if anyone can give me a few pointers of what is needed to have this happen. |
@cosmincatalin have you tried building from source https://github.com/apache/incubator-mxnet/tree/v1.x/scala-package#build-from-source? Are you interested in the CPU or GPU packages? There are some licensing issues with the binaries at For the GPU packages, it depends on NVidia. They have internal discussions considering if they'd be able to make their EULA compatible with Apache License 2. You can also refer to https://issues.apache.org/jira/browse/INFRA-20442 for more information. |
I've tinkered a little with building from source, but wasn't very successful, I guess I need to focus on it more. To answer your second question, yes, I am interested specifically in the CPU packages. |
hey, I'm interested on this, count me in if you want help @cosmincatalin |
hey @leezu , I got to compile the project using
then I realized that the I have Java 11 installed and that may be the source of the error above, would that be correct? |
@tavoaqp I think that's right. cc @lanking520 who's helping with a build instruction and planning to share past experiences on upgrade like this. |
I have some instruction in this repository https://github.com/cosmincatalin/mxnet-compiler. I use a custom made Docker image to compile a linux based MXNet library and then I compile the Scala 2.11 binding. The image has Java 8 baked in. |
instead of build from source, you can get the pip wheel for mxnet and put the so in the lib folder. I would suggest start with Another beast in the code is the code generation system. I am not sure if 2.12 or 2.13 would have consistent support on quasiquote to get it work, but worth for a try. Finally is the Spark support, you may need to change some code to get Spark fully support there. |
thanks @lanking520 ! seems like a lot of work 😄 , @cosmincatalin I will try your setup! |
@lanking520 Yeah, that works too. I tried with so's from the wheel, and that worked. That being said, 2.12 and 2.13 are a must since a lot Scala code is now on 2.12 at least. Spark is now on 2.12. It would have been nice if the whole setup was based on |
hey @lanking520 I got some progress: I switched to Scala 2.12.12 and fixed the dependencies. Everything compiles (with some warnings though) but when it comes to compile the [INFO] --- scala-maven-plugin:3.4.4:doc-jar (compile) @ mxnet-examples ---
/home/gustavo/git/incubator-mxnet/scala-package/examples/src/main/java/org/apache/mxnetexamples/javaapi/benchmark/ObjectDetectionBenchmark.java:35: error: not found: type NDArray$
private NDArray$ NDArray = NDArray$.MODULE$;
^
/home/gustavo/git/incubator-mxnet/scala-package/examples/src/main/java/org/apache/mxnetexamples/javaapi/infer/bert/BertQA.java:52: error: not found: type NDArray$
private static NDArray$ NDArray = NDArray$.MODULE$;
^
/home/gustavo/git/incubator-mxnet/scala-package/examples/src/main/java/org/apache/mxnetexamples/javaapi/infer/predictor/PredictorExample.java:48: error: not found: type NDArray$
private static NDArray$ NDArray = NDArray$.MODULE$; Any pointers? |
Yeah, I've stumbled on this one as well. Come to think of it, maybe I haven't actually been able to generate bindings for 2.12 🤔 |
Acutally this is used for Java to access the NDArray class. |
So, is there a way to get pass the issue with the |
I haven't had spare time to see this! Still not sure why is this happening, I believe that the POM project is not generating the Java byte code in the correct path. |
October 2021 - is this project really stuck at Scala 2.11 (anno 2014)? I didn't expect it to work with Scala 3, but not even 2.13, come on? Any pointers to other machine learning frameworks that work with contemporary Scala versions? |
Does anyone know if mxnet still has any scala or java bindings update on the roadmap? Or is it only python at this point? |
The Scala language binding is badly needed for high performance training/inference around Apache Spark. The current Scala language binding is for 2.11 and the MXNet version is 1.5.1.
Please add 2.12 and 2.13 packages for 1.6.0 and up. TF has eaplatanios/tensorflow_scala, which while being a non-official release, has a lot of traction and builds for both 2.12 and 2.13.
The text was updated successfully, but these errors were encountered: