You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/12/09 04:50:48 UTC
[GitHub] [incubator-mxnet] TaoLv commented on a change in pull request
#15921: dynamic custom operator support
TaoLv commented on a change in pull request #15921: dynamic custom operator support
URL: https://github.com/apache/incubator-mxnet/pull/15921#discussion_r355262466
##########
File path: tests/python/unittest/test_extensions.py
##########
@@ -21,15 +21,16 @@
import platform
import unittest
import mxnet as mx
+import numpy as np
from mxnet.base import MXNetError
-from mxnet.test_utils import download, is_cd_run
+from mxnet.test_utils import download, is_cd_run, assert_almost_equal
def check_platform():
return platform.machine() not in ['x86_64', 'AMD64']
@unittest.skipIf(check_platform(), "not all machine types supported")
@unittest.skipIf(is_cd_run(), "continuous delivery run - ignoring test")
-def test_library_loading():
+def test_custom_op():
Review comment:
It has a strong assumption that the case will be called from mxnet root folder. Otherwise, the libsample_lib.so will not be found.
```
$ cd tests/python/unittest/
$ nosetests -v test_extensions:test_custom_op
test_extensions.test_custom_op ... ERROR
======================================================================
ERROR: test_extensions.test_custom_op
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lvtao/miniconda3/envs/mxnet/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/home/lvtao/Workspace/mxnet-official/tests/python/unittest/test_extensions.py", line 41, in test_custom_op
raise MXNetError("library %s not found " % lib)
mxnet.base.MXNetError: library libsample_lib.so not found
----------------------------------------------------------------------
Ran 1 test in 0.005s
FAILED (errors=1)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services