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 2020/12/17 03:57:30 UTC

[GitHub] [incubator-mxnet] josephevans opened a new pull request #19689: [v1.x] Add more onnx export unit tests, refactor onnxruntime tests.

josephevans opened a new pull request #19689:
URL: https://github.com/apache/incubator-mxnet/pull/19689


   ## Description ##
   Add unit tests for onnx export for the following operators:
   * transpose
   * expand_dims
   * broadcast_add
   * stack
   * dropout
   
   Refactor onnxruntime tests to use tmp_path from pytest and parametrize model names so pytest splits up tests.


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 merged pull request #19689: [v1.x] Add more onnx export unit tests, refactor onnxruntime tests.

Posted by GitBox <gi...@apache.org>.
Zha0q1 merged pull request #19689:
URL: https://github.com/apache/incubator-mxnet/pull/19689


   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] Zha0q1 commented on a change in pull request #19689: [v1.x] Add more onnx export unit tests, refactor onnxruntime tests.

Posted by GitBox <gi...@apache.org>.
Zha0q1 commented on a change in pull request #19689:
URL: https://github.com/apache/incubator-mxnet/pull/19689#discussion_r544826175



##########
File path: tests/python-pytest/onnx/test_operators.py
##########
@@ -171,3 +171,45 @@ def test_onnx_export_fully_connected(tmp_path, dtype, num_hidden, no_bias, flatt
     op_export_test('FullyConnected', M, args, tmp_path)
 
 
+@pytest.mark.parametrize('dtype', ['float32', 'float64', 'int32', 'int64'])
+@pytest.mark.parametrize('axes', [None, [1,0,2]])
+def test_onnx_export_transpose(tmp_path, dtype, axes):
+    if axes != None:
+        M = def_model('transpose', axes=axes)
+    else:
+        M = def_model('transpose')
+    x = mx.nd.array([[[1,2],[3,4]],[[5,6],[7,8]]], dtype=dtype)
+    op_export_test('transpose', M, [x], tmp_path)
+
+
+@pytest.mark.parametrize('dtype', ['float32', 'float64'])
+@pytest.mark.parametrize('axis', [0, 1, 2])
+def test_onnx_export_expand_dims(tmp_path, dtype, axis):
+    M = def_model('expand_dims', axis=axis)
+    x = mx.nd.random.uniform(0, 1, (2,3,4), dtype=dtype)
+    op_export_test('expand_dims', M, [x], tmp_path)
+
+
+@pytest.mark.parametrize('dtype', ['float32', 'float64', 'int32', 'int64'])
+def test_onnx_export_broadcast_add(tmp_path, dtype):
+    M = def_model('broadcast_add')
+    x = mx.nd.array([[1,1,1],[1,1,1]], dtype=dtype)
+    y = mx.nd.array([[0],[1]], dtype=dtype)
+    op_export_test('broadcast_add', M, [x, y], tmp_path)
+
+
+@pytest.mark.parametrize('dtype', ['float32', 'float64', 'int32', 'int64'])
+@pytest.mark.parametrize('axis', [0, 1, -1])
+def test_onnx_export_stack(tmp_path, dtype, axis):
+    M = def_model('stack', axis=axis)

Review comment:
       shall we also try higher dimensional inputs?




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #19689: [v1.x] Add more onnx export unit tests, refactor onnxruntime tests.

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #19689:
URL: https://github.com/apache/incubator-mxnet/pull/19689#issuecomment-747189027


   Hey @josephevans , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [unix-gpu, centos-gpu, edge, sanity, centos-cpu, clang, windows-gpu, unix-cpu, windows-cpu, miscellaneous, website]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


----------------------------------------------------------------
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