This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 61a456b [master][tests] __init__' file to avoid undefined variables
(#20701)
61a456b is described below
commit 61a456ba5fcc59982ad15fc849e721df21cabb26
Author: mozga <[email protected]>
AuthorDate: Wed Oct 27 16:41:04 2021 +0200
[master][tests] __init__' file to avoid undefined variables (#20701)
* Add full import to avoid undefined varaibles
* Roll back full import
---
.../model_backwards_compatibility_check/__init__.py | 20 ++++++++++++++++++++
.../model_backwards_compat_inference.py | 2 +-
.../model_backwards_compat_train.py | 2 +-
tests/python/unittest/test_numpy_default_dtype.py | 2 +-
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/tests/nightly/model_backwards_compatibility_check/__init__.py
b/tests/nightly/model_backwards_compatibility_check/__init__.py
new file mode 100644
index 0000000..60e41c8
--- /dev/null
+++ b/tests/nightly/model_backwards_compatibility_check/__init__.py
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# coding: utf-8
+
+from .common import *
diff --git
a/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py
b/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py
index 6e772ce..c57c0f4 100644
---
a/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py
+++
b/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_inference.py
@@ -17,7 +17,7 @@
# specific language governing permissions and limitations
# under the License.
-from common import *
+from .common import *
def test_lenet_gluon_load_params_api():
model_name = 'lenet_gluon_save_params_api'
diff --git
a/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_train.py
b/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_train.py
index 5623c34..1a81761 100644
---
a/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_train.py
+++
b/tests/nightly/model_backwards_compatibility_check/model_backwards_compat_train.py
@@ -17,7 +17,7 @@
# specific language governing permissions and limitations
# under the License.
-from common import *
+from .common import *
def train_lenet_gluon_save_params_api():
diff --git a/tests/python/unittest/test_numpy_default_dtype.py
b/tests/python/unittest/test_numpy_default_dtype.py
index 4f9867a..957f23e 100644
--- a/tests/python/unittest/test_numpy_default_dtype.py
+++ b/tests/python/unittest/test_numpy_default_dtype.py
@@ -181,7 +181,7 @@ def check_default_dtype(op_list):
assert False
assert workloads is not None, 'Workloads for operator `{}` has not
been ' \
'added for checking default dtype with
the ' \
- 'official NumPy and the deep
NumPy.'.format(name)
+ 'official NumPy and the deep
NumPy.'.format(op_name)
for workload in workloads:
check_np_default_dtype(op, *workload['args'], **workload['kwargs'])
check_deepnp_default_dtype(op, *workload['args'],
**workload['kwargs'])