Cannot find class JBlasBackend (new with 1.0.0-M1)

I updated my POM to 1.0.0-M1 today and it seems to have broken my code. I’m now getting some backendy errors on INDArray creation via Nd4j.create(someArray):

14:09:47.831 [main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] backend
14:09:47.831 [main] ERROR org.nd4j.common.config.ND4JClassLoading - Cannot find class [org.nd4j.linalg.jblas.JblasBackend] of provided class-loader.
14:09:47.831 [main] ERROR org.nd4j.common.config.ND4JClassLoading - Cannot find class [org.canova.api.io.data.DoubleWritable] of provided class-loader.
14:09:47.831 [main] ERROR org.nd4j.common.config.ND4JClassLoading - Cannot find class [org.nd4j.linalg.jblas.JblasBackend] of provided class-loader.
14:09:47.831 [main] ERROR org.nd4j.common.config.ND4JClassLoading - Cannot find class [org.canova.api.io.data.DoubleWritable] of provided class-loader.
Warning: Could not load Loader: java.lang.UnsatisfiedLinkError: java.io.FileNotFoundException: C:\Users\wneill\.javacpp\cache\.lock (Access is denied)

That access is denied bit is weird.

Somewhere down the stack, I’m being informed that I might be missing dependencies. Are there new dependencies that I should include for this new version of nd4j?

Help is appreciated!

@wcneill actually this is noise that will go away in the next version: nd4j VersionCheck logs unnecessary errors (for desired behavior) · Issue #9340 · eclipse/deeplearning4j · GitHub

Regarding the locked cache, it could be another process? @saudet might have more insight here

Looks like an error that we can get on encrypted folders and probably other cases as well:

Try to use another folder somewhere on your system by setting the org.bytedeco.javacpp.cachedir system property:
http://bytedeco.org/javacpp/apidocs/org/bytedeco/javacpp/Loader.html#getCacheDir--

Thank you, and also @agibsonccc.

I’ll take a look at changing the file. Any idea as to why this is occurring in the new version?

Does it happen with JavaCV 1.5.5 as well or only with DL4J 1.0.0-M1?

I’m not sure what JavaCV is to be honest. If it’s like OpenCV for java, then I’m probably not using it. Most of my applications right now are clustering based, so I’m just using nd4j for my work.

I look forward to working with DL4J, especially since I heard I might be able to port my TF and PT models over one day soon.

@wcneill it’s what underpins datavec-image. @saudet maintains it and it’s basically a higher level wrapper on top of the javacpp opencv bindings.
@wcneill regarding that, there’s a model import framework you’re welcome to help take a look at. You can see an overview of the new model import framework here:
https://deeplearning4j.konduit.ai/v/en-1.0.0-m1/samediff/explanation/model-import-framework

The kotlin descriptors for what are the default ops can be found in each of their respective modules:

I’m doing some kaggling on the side to keep my Python fresh. I’ll see if I can’t get some of my PyTorch models ported over.

I think I saw elsewhere that it needs to be converted to ONNX first, which I’ve not messed with before but I’ll give it a shot.

@saudet Also for whatever reason, that .lock file was hidden and I just had to uncheck hide in the file properties on windows. Now the new version is running fine on my machine.

@wcneill just of note, 1.0.0-M1.1 (notice the .1) with some improvements to the helper functionality (it was breaking things for some people) - regarding onnx. Again there’s 2 ways of running it: onnxruntime (which is just for inference) or the new model import framework.

Take a look at the supported ops or send me your model and I would be happy to help you convert it. It’s very easy to extend the framework with annotations as a workaround if something doesn’t work and I would love a real test case.