From 5f08bba7040c7098e23e1821d58d813c5b6e1d61 Mon Sep 17 00:00:00 2001 From: reminisce Date: Sun, 13 Oct 2019 14:44:04 -0700 Subject: [PATCH] Fix pylint --- python/mxnet/test_utils.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/python/mxnet/test_utils.py b/python/mxnet/test_utils.py index 46adab1a0966..e5f2c6c02089 100644 --- a/python/mxnet/test_utils.py +++ b/python/mxnet/test_utils.py @@ -2238,14 +2238,14 @@ def has_tvm_ops(): built_with_tvm_op = _features.is_enabled("TVM_OP") ctx = current_context() if ctx.device_type == 'gpu': - try: - cc = get_cuda_compute_capability(ctx) - except: - print('Failed to get CUDA compute capability for context {}. The operators ' + try: + cc = get_cuda_compute_capability(ctx) + except: # pylint: disable=bare-except + print('Failed to get CUDA compute capability for context {}. The operators ' 'built with USE_TVM_OP=1 will not be run in unit tests.'.format(ctx)) - return False - print('Cuda arch compute capability: sm_{}'.format(str(cc))) - return built_with_tvm_op and cc >= 53 + return False + print('Cuda arch compute capability: sm_{}'.format(str(cc))) + return built_with_tvm_op and cc >= 53 return built_with_tvm_op @@ -2260,7 +2260,7 @@ def is_op_runnable(): else: try: cc = get_cuda_compute_capability(ctx) - except: + except: # pylint: disable=bare-except print('Failed to get CUDA compute capability for context {}. The operators ' 'built with USE_TVM_OP=1 will not be run in unit tests.'.format(ctx)) return False