Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[v1.x] Move majority of ONNX model tests to nightly, only test a few models in PR pipeline #19848

Merged
merged 15 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1254,11 +1254,19 @@ integrationtest_ubuntu_cpu_onnx() {
export MXNET_SUBGRAPH_VERBOSE=0
export DMLC_LOG_STACK_TRACE_DEPTH=10
COV_ARG="--cov=./ --cov-report=xml --cov-append"
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_operators.py
pytest $COV_ARG --verbose tests/python-pytest/onnx/mxnet_export_test.py
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_models.py
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_node.py
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_operators.py
pytest -n 24 $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_bert_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_class_model_inference_onnxruntime[mobilenetv3_large]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_class_model_inference_onnxruntime[resnest200]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_class_model_inference_onnxruntime[resnet50_v2]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_class_model_inference_onnxruntime[vgg19_bn]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_detection_model_inference_onnxruntime[center_net_resnet101_v1b_voc]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_img_segmentation_model_inference_onnxruntime[deeplab_resnet50_citys]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_pose_estimation_model_inference_onnxruntime[mobile_pose_mobilenet1.0]
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_action_recognition_model_inference_onnxruntime[inceptionv3_kinetics400]
}

integrationtest_ubuntu_gpu_python() {
Expand Down Expand Up @@ -1587,6 +1595,20 @@ nightly_estimator() {
nosetests test_sentiment_rnn.py
}

nightly_onnx_tests() {
set -ex
export PYTHONPATH=./python/
export MXNET_SUBGRAPH_VERBOSE=0
export DMLC_LOG_STACK_TRACE_DEPTH=10
COV_ARG="--cov=./ --cov-report=xml --cov-append"
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_bert_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_class_model_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_obj_detection_model_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_img_segmentation_model_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_pose_estimation_model_inference_onnxruntime
pytest $COV_ARG --verbose tests/python-pytest/onnx/test_onnxruntime.py::test_action_recognition_model_inference_onnxruntime
josephevans marked this conversation as resolved.
Show resolved Hide resolved
}

# For testing PRs
deploy_docs() {
set -ex
Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def test_unix_julia10_cpu() {
}

def test_unix_onnx_cpu() {
return ['Onnx CPU': {
return ['Onnx CPU - Unit Tests': {
node(NODE_LINUX_CPU) {
ws('workspace/it-onnx-cpu') {
timeout(time: max_time, unit: 'MINUTES') {
Expand Down
8 changes: 4 additions & 4 deletions python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,10 @@ def convert_copy(node, **kwargs):

@mx_op.register("identity")
def convert_identity(node, **kwargs):
"""Map MXNet's identity operator attributes to onnx's ConstantFill operator
"""Map MXNet's identity operator attributes to onnx's Identity operator
and return the created node.
"""
return create_basic_op_node('ConstantFill', node, kwargs)
return create_basic_op_node('Identity', node, kwargs)

@mx_op.register("InstanceNorm")
def convert_instancenorm(node, **kwargs):
Expand Down Expand Up @@ -1017,12 +1017,12 @@ def convert_logistic_regression_output(node, **kwargs):
@mx_op.register("BlockGrad")
def convert_blockgrad(node, **kwargs):
""" Skip operator """
return create_basic_op_node('ConstantFill', node, kwargs)
return create_basic_op_node('Identity', node, kwargs)

@mx_op.register("MakeLoss")
def convert_makeloss(node, **kwargs):
""" Skip operator """
return create_basic_op_node('ConstantFill', node, kwargs)
return create_basic_op_node('Identity', node, kwargs)

@mx_op.register("Concat")
def convert_concat(node, **kwargs):
Expand Down
8 changes: 8 additions & 0 deletions tests/nightly/JenkinsfileForBinaries
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ core_logic: {
utils.docker_run('ubuntu_nightly_gpu', 'nightly_estimator', true)
}
}
},
'ONNX: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/onnx-test-cpu') {
utils.unpack_and_init('cpu_int64', mx_cmake_lib)
utils.docker_run('ubuntu_nightly_cpu', 'nightly_onnx_tests', false)
}
}
}
}
}
Expand Down
Loading