hqucms commented on a change in pull request #11493: Fix MXPredReshape in the 
c_predict_api
URL: https://github.com/apache/incubator-mxnet/pull/11493#discussion_r205619218
 
 

 ##########
 File path: amalgamation/python/mxnet_predict.py
 ##########
 @@ -51,15 +51,24 @@ def c_array(ctype, values):
 def _find_lib_path():
     """Find mxnet library."""
     curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
-    api_path = os.path.join(curr_path, '../../lib/')
-    dll_path = [curr_path, api_path]
-    dll_path = [os.path.join(p, 'libmxnet.so') for p in dll_path] + \
-        [os.path.join(p, 'libmxnet_predict.so') for p in dll_path]
-    lib_path = [p for p in dll_path if os.path.exists(p) and os.path.isfile(p)]
-    if len(lib_path) == 0:
-        raise RuntimeError('Cannot find the files.\n' +
-                           'List of candidates:\n' + str('\n'.join(dll_path)))
-    return lib_path
+    amalgamation_lib_path = os.path.join(curr_path, 
'../../lib/libmxnet_predict.so')
+    if os.path.exists(amalgamation_lib_path) and 
os.path.isfile(amalgamation_lib_path):
+        lib_path = [amalgamation_lib_path]
+        return lib_path
+    else:
 
 Review comment:
   @apeforest 
   Done: 
https://github.com/apache/incubator-mxnet/pull/11493/commits/f3d70681421e627d7ad8481fb6254ede2190d945

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to