You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by cm...@apache.org on 2019/11/01 17:28:28 UTC
[incubator-mxnet] 01/01: change the wording and log level to be
more in line with the general use case of loading from the jar
This is an automated email from the ASF dual-hosted git repository.
cmeier pushed a commit to branch change-warning-on-base-loading-of-scala-native
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
commit 2533bd6e70b824b8158195d0b54daf82af85d7ec
Author: gigasquid <cm...@gigasquidsoftware.com>
AuthorDate: Fri Oct 25 11:44:09 2019 -0400
change the wording and log level to be more in line with the general use
case of loading from the jar
---
.../core/src/main/scala/org/apache/mxnet/Base.scala | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
index 001bd04..c3378ec 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/Base.scala
@@ -62,18 +62,17 @@ private[mxnet] object Base {
// The primitives currently supported for NDArray operations
val MX_PRIMITIVES = new Group ((Double, Float))
+
+ /* Find the native libray either on the path or copy it from
+ * the jar in the dependency
+ * jar into a temp directory and load it
+ */
try {
try {
tryLoadLibraryOS("mxnet-scala")
} catch {
case e: UnsatisfiedLinkError =>
- logger.warn("MXNet Scala native library not found in path. " +
- "Copying native library from the archive. " +
- "Consider installing the library somewhere in the path " +
- "(for Windows: PATH, for Linux: LD_LIBRARY_PATH), " +
- "or specifying by Java cmd option -Djava.library.path=[lib path].")
- logger.warn("LD_LIBRARY_PATH=" + System.getenv("LD_LIBRARY_PATH"))
- logger.warn("java.library.path=" + System.getProperty("java.library.path"))
+ logger.info("Copying and loading native library from the jar archive")
NativeLibraryLoader.loadLibrary("mxnet-scala")
}
} catch {