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

Failed to load MXNet native library #2878

Open
Lenkense opened this issue Nov 28, 2023 · 1 comment
Open

Failed to load MXNet native library #2878

Lenkense opened this issue Nov 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Lenkense
Copy link

Description

I'm trying to run TrainTicTacToe.java example. It used to work but for some reason is no longer working.

Expected Behavior

After running the main method of training should start.

Error Message

DEBUG Registering EngineProvider: MXNet
DEBUG Found default engine: MXNet
Exception in thread "main" ai.djl.engine.EngineException: Failed to load MXNet native library
at ai.djl.mxnet.engine.MxEngine.newInstance(MxEngine.java:77)
at ai.djl.mxnet.engine.MxEngineProvider.getEngine(MxEngineProvider.java:40)
at ai.djl.engine.Engine.getEngine(Engine.java:177)
at ai.djl.engine.Engine.getInstance(Engine.java:132)
at ai.djl.ndarray.NDManager.newBaseManager(NDManager.java:114)
at com.cloudautoscaling.runableExamples.deepRL.TrainTicTacToe.runExample(TrainTicTacToe.java:70)
at com.cloudautoscaling.runableExamples.deepRL.TrainTicTacToe.main(TrainTicTacToe.java:57)
Caused by: java.lang.NoSuchMethodError: 'java.lang.String ai.djl.util.Utils.getEnvOrSystemProperty(java.lang.String)'
at ai.djl.mxnet.jna.LibUtils.findOverrideLibrary(LibUtils.java:89)
at ai.djl.mxnet.jna.LibUtils.getLibName(LibUtils.java:81)
at ai.djl.mxnet.jna.LibUtils.loadLibrary(LibUtils.java:67)
at ai.djl.mxnet.jna.JnaUtils.(JnaUtils.java:71)
at ai.djl.mxnet.engine.MxEngine.newInstance(MxEngine.java:53)
... 6 more

What have you tried to solve it?

I have found many solution involving gradle but I'm using maven so I don't know how to adapt thos solutions. Additionally many solutions link to README.md files that no longer exist.

@Lenkense Lenkense added the bug Something isn't working label Nov 28, 2023
@frankfliu
Copy link
Contributor

java.lang.NoSuchMethodError, this is most likely you are using a mismatched DJL API and MXNet engine library.

You can use BOM to avoid versioning issue: https://docs.djl.ai/bom/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants