-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Running the mxnet scala jar in the interpreter throws an error #13468
Comments
@mxnet-label-bot add [scala] |
@mxnet-label-bot add [Bug] |
Is this a bug? I think you should use -cp instead of -classpath with scala, some of the errors you mention is that scala can't find the scala standard library. The error about the logging is fine. Could you try again with -cp and see if it works? |
Same errors...
|
I see, I think they are equivalent. That error means that it can't find the scala standard library. It could be something wrong with your scala instalation is not related to mxnet from what I see. |
This probably needs to be reported as another issue, but I tried the scala setup steps to see if something was messed up with my install, and met with further errors.
Then it fails with:
I tried this on my Mac and on Ubuntu. Same thing happens. I messed with the version too... I thought maybe 1.3.1 would work, but it does not. |
Im trying to follow the instructions on setting up scala, they need some love... :/ |
Why are we packing the standard library in the scala Jar?
|
|
I did some testing and it looks to me like this might be a problem that comes up depending upon your scala version. When I use version 2.11.8 the commands run correctly. When using 2.12.6 I get the errors that @aaronmarkham reported. I'm not sure of the reason. Naively, I'd expect that the 2.12.6 scala binary would be backwards compatible with 2.11.x. |
Works for me with 2.11.7 compiled from master. Still we are packing the standard library, this doesn't seem right:
|
Could you please try again, are you still facing the same issue? |
Scala doesn't support binary compatibility between major versions. It only promise source code level compatibility. Means if you want to run scala 2.12, you have to recompile our scala project. |
@aaronmarkham I'm not able to find the instructions involving the interpreter, otherwise I would try to clarify them. Since it seems to just be a problem with your installed scala version, do you think this issue is resolved? As for the problem with the scala demo #13468 (comment), we improved upon that by using the nightly snapshot repository so it should be much simpler now. |
@frankfliu doesn't many projects release in maven with different scala versions? https://stackoverflow.com/questions/13872226/how-to-support-multiple-scala-versions-in-a-library/13880582#13880582 |
@larroy What I see the most is that they will release different artifacts for each supported Scala version and append _scalaVersion to the artifact name (see https://mvnrepository.com/artifact/org.scalacheck/scalacheck or https://search.maven.org/search?q=g:org.scalatest for an example). We do need to take a look at our Scala versions. We currently publish 2.11.8 when we really should be producing both 2.11.12 and 2.12.8. We also publish an artifact that does not indicate the scala version: org.apache.mxnet:mxnet-full_2.11-linux-x86_64-gpu (it indicates the os instead and we have linux-cpu, linux-gpu, and osx). |
Thanks @zachgk @lanking520 and others. The assembly & core jar artifacts look much better now. This is certainly an improvement. I think linking with OpenCV statically would help, in Ubuntu 18.04 for example there's opencv 3.2 but not OpenCV 2.4 with results in being unable to load the library:
|
@larroy We do link opencv statically (and everything else statically linked by the pip package) following the publish instructions (https://github.com/apache/incubator-mxnet/tree/master/ci/publish) that we use to publish the releases and nightly snapshots. The normal build instructions for building from source do not. |
Seemed to be good to close now 👍 |
Description
If you try following the docs for Scala --> NDArray, it uses the interpreter. The latest jar doesn't work in the interpreter.
You can recreate this by running:
Then paste in one of the examples:
Errors
First one you see:
Then you also get:
The text was updated successfully, but these errors were encountered: