-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nose
imports
#5698
Fix nose
imports
#5698
Conversation
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@@ -23,7 +23,7 @@ | |||
import random | |||
import tempfile | |||
from nose_utils import assert_raises | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -23,7 +23,7 @@ | |||
import nvidia.dali as dali | |||
|
|||
from nose_utils import assert_raises | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above and below.
CI MESSAGE: [20053934]: BUILD STARTED |
@@ -28,7 +28,7 @@ | |||
) | |||
from nose2.tools import params, cartesian_params | |||
from nose_utils import assert_raises, SkipTest | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -279,7 +279,7 @@ def check_fancy_upsampling_body(batch_size, img_type, device): | |||
@params(1, 8) | |||
def test_fancy_upsampling(batch_size): | |||
if nvidia.dali.backend.GetNvjpegVersion() < 12001: | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this to the beginning of the file.
@@ -280,7 +280,7 @@ def check_fancy_upsampling_body(batch_size, img_type, device): | |||
@params(1, 8) | |||
def test_fancy_upsampling(batch_size): | |||
if nvidia.dali.backend.GetNvjpegVersion() < 12001: | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be removed here as is duplicates L32.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True.
@@ -19,7 +19,7 @@ | |||
from nvidia.dali import pipeline_def | |||
|
|||
from nose_utils import assert_raises | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
from nose import SkipTest | ||
from nose.plugins.attrib import attr | ||
from nose_utils import SkipTest | ||
from nose_utils import attr | ||
from nose_utils import assert_raises |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -22,7 +22,7 @@ | |||
from scipy.ndimage import convolve1d | |||
import os | |||
from nose_utils import assert_raises, raises | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -21,7 +21,7 @@ | |||
from scipy.ndimage import convolve1d, filters as sp_filters | |||
import os | |||
from nose_utils import assert_raises | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -28,7 +28,7 @@ | |||
) | |||
from nvidia.dali.plugin.numba.fn.experimental import numba_function | |||
from numba import cuda | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with L22.
@@ -23,8 +23,7 @@ | |||
import scipy.ndimage.measurements | |||
import random | |||
from test_utils import check_batch, np_type_to_dali | |||
from nose.tools import nottest | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr, nottest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with L17
@@ -23,7 +23,7 @@ | |||
from test_utils import compare_pipelines, get_dali_extra_path | |||
from nose_utils import assert_raises, raises | |||
from nose2.tools import cartesian_params | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with L24
@@ -18,7 +18,7 @@ | |||
import test_dali_tf_dataset_mnist as mnist | |||
from test_utils_tensorflow import skip_for_incompatible_tf, available_gpus | |||
from nose_utils import raises | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -16,7 +16,7 @@ | |||
from nvidia.dali import tensors, pipeline_def | |||
import nvidia.dali.fn as fn | |||
from nose_utils import raises, assert_equals | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -20,7 +20,7 @@ | |||
from nose_utils import assert_raises | |||
import sys | |||
import inspect | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with L20
@@ -21,7 +21,7 @@ | |||
from nvidia.dali import fn, types | |||
from test_utils import get_dali_extra_path, get_arch | |||
from nose_utils import raises, assert_raises | |||
from nose import SkipTest | |||
from nose_utils import SkipTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can merge it with the above.
@@ -14,7 +14,7 @@ | |||
|
|||
import numpy as np | |||
import os | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with L23 and L25
@@ -15,7 +15,7 @@ | |||
|
|||
import numpy as np | |||
import nvidia.dali.fn as fn | |||
from nose.plugins.attrib import attr | |||
from nose_utils import attr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be merged with L24
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
@@ -23,7 +23,7 @@ | |||
import math | |||
import random | |||
import os | |||
from nose.tools import nottest | |||
from nose_utils import nottest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be moved to L15
0b85217
to
0474225
Compare
CI MESSAGE: [20054170]: BUILD STARTED |
CI MESSAGE: [20054170]: BUILD FAILED |
Signed-off-by: Michal Zientkiewicz <michalz@nvidia.com>
0474225
to
934e43a
Compare
CI MESSAGE: [20055387]: BUILD STARTED |
CI MESSAGE: [20055387]: BUILD PASSED |
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
We need to import
nose_utils
before anything directly usingnose
in Python 3.12.Since Python 3.12 is not tested at pre-merge, it was easy to miss.
This PR replaces all direct imports of nose, nose.tool, nose.plugins, etc. so there's no bad example to copy from.
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A