Conversation
Greptile SummaryThis PR completes the migration from Confidence Score: 5/5Safe to merge; all previously flagged P1 issues have been resolved, and the one remaining finding is a minor P2 about plain-class setUp lifecycle. Prior blocking issues (missing sanitizer_skip attributes, --attr vs -A syntax, .1 vs :1 parameterized selector, missing comma in attribute expressions) are all resolved in the current HEAD. The only open finding is a P2 concern about TestTFDatasetMultiGPU and similar plain classes not inheriting unittest.TestCase, which may affect setUp call guarantees when tests are loaded by explicit name — not a hard blocker. dali/test/python/test_dali_tf_dataset_eager.py — verify setUp is called for plain-class tests invoked by explicit name via nose2. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI shell script] -->|python_new_invoke_test -A filter module.Class.method| B[python -m nose2]
B --> C{unittest.cfg plugins}
C --> D[nose2_attrib_generators\nAttributeGeneratorFilter]
C --> E[nose2.plugins.attrib\nAttributeSelector]
C --> F[nose2.plugins.collect]
D -->|handleArgs: monkey-patches| G[Generators plugin\n_testsFromGeneratorFunc]
G -->|check @attr tags before calling| H{Attribute match?}
H -- No --> I[return empty list\nskip generator]
H -- Yes --> J[call generator - yield tests]
E -->|moduleLoadedSuite: filter| K[Individual test methods\nwith @attr tags]
J --> K
K --> L[Run tests]
Reviews (22): Last reviewed commit: "Fix" | Re-trigger Greptile |
There was a problem hiding this comment.
Additional Comments (1)
-
dali/test/python/nose_utils.py, line 129-130 (link)style: creating a new
TestCaseinstance for each assertion call is unconventionalConsider creating a module-level instance once:
Then define
tcat module level (after imports) and reuse it in bothassert_raisesandassert_warnsNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
25 files reviewed, 1 comment
There was a problem hiding this comment.
Additional Comments (2)
-
dali/test/python/test_functional_api.py, line 22 (link)logic: This file still imports
nosedirectly and usesnose.tools.eq_on line 188. Since nose is being removed as a dependency, this will cause an import error. -
dali/test/python/test_functional_api.py, line 188 (link)logic: Replace
nose.tools.eq_with standard assertion or useassert_equalsfromnose_utilsNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
28 files reviewed, 2 comments
There was a problem hiding this comment.
Additional Comments (1)
-
dali/test/python/nose_utils.py, line 68 (link)syntax: missing
selfparameter - instance methods must haveselfas first parameter
29 files reviewed, 1 comment
|
!build |
|
CI MESSAGE: [40627092]: BUILD STARTED |
|
CI MESSAGE: [40627092]: BUILD FAILED |
|
!build |
|
CI MESSAGE: [40628704]: BUILD STARTED |
There was a problem hiding this comment.
Additional Comments (1)
-
dali/test/python/nose_utils.py, line 83-85 (link)style: Consider using the module-level
_test_caseinstance instead of creating a newempty_case()for each assertion:This is more efficient and aligns with how
assert_raisesandassert_warnsare implemented.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
29 files reviewed, 1 comment
|
Do we need to touch |
|
CI MESSAGE: [40628704]: BUILD FAILED |
mzient
left a comment
There was a problem hiding this comment.
The way the tests are first discovered and then run will most certainly prevent parallel external source from working (see test job 247483858) was the primary reason for not pursuing full transition to nose2 to date.
Perhaps you can move the troublesome tests to separate files to guarantee proper execution order.
Also, some of the tests used to generate vast amounts of data in the "discovery" stage, because yielding in nose didn't cause data accumulation. Please make sure that this is not the case any more - the tests might work when run one by one but case out-of-memory condition when multiple test files are run.
There was a problem hiding this comment.
Additional Comments (1)
-
dali/test/python/nose_utils.py, line 74 (link)syntax: Missing
selfparameter in method definition
33 files reviewed, 1 comment
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
- nose_utils.py: consolidate double unittest import into single form - test_dali_tf_es_pipelines.py: gen_tf_with_dali_external_source now yields a make_es_args factory instead of pre-built callback objects, so no data is created during test discovery - test_dali_tf_dataset_graph.py: call make_es_args() at test run time - test_external_source_parallel.py: _make_all_kinds_parallel_cases yields (epoch_size, ...) descriptors; ExtCallback/SampleCallbackBatched/ SampleCallbackIterator are constructed inside test_all_kinds_parallel Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
test_numba_func_with_cond tests passed np.full(...) directly in expected_out and were not updated when the descriptor format was introduced in 839dfb1, causing a ValueError on unpack. Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
|
|
||
| if [ -z "$DALI_ENABLE_SANITIZERS" ]; then | ||
| ${python_new_invoke_test} -A "!slow,!pytorch,!mxnet,!cupy" test_dali_variable_batch_size | ||
| ${python_new_invoke_test} -A "!slow,!pytorch!cupy" test_dali_variable_batch_size |
There was a problem hiding this comment.
| ${python_new_invoke_test} -A "!slow,!pytorch!cupy" test_dali_variable_batch_size | |
| ${python_new_invoke_test} -A "!slow,!pytorch,!cupy" test_dali_variable_batch_size |
| ${python_new_invoke_test} -A "!slow,!pytorch!cupy" test_dali_variable_batch_size | ||
| else | ||
| ${python_new_invoke_test} -A "!slow,!pytorch,!mxnet,!cupy,!numba" test_dali_variable_batch_size | ||
| ${python_new_invoke_test} -A "!slow,!pytorch!cupy,!numba" test_dali_variable_batch_size |
There was a problem hiding this comment.
| ${python_new_invoke_test} -A "!slow,!pytorch!cupy,!numba" test_dali_variable_batch_size | |
| ${python_new_invoke_test} -A "!slow,!pytorch,!cupy,!numba" test_dali_variable_batch_size |
|
!build |
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
|
CI MESSAGE: [49014072]: BUILD STARTED |
|
CI MESSAGE: [49014072]: BUILD FAILED |
|
!build |
|
CI MESSAGE: [49016580]: BUILD STARTED |
|
CI MESSAGE: [49016580]: BUILD FAILED |
Use nose2 as the only testing framework. Drop nose.
Category: Other
Description:
Remove the WARs used to keep nose alive.
nose2 supports the yield-style test discovery by default @attr has a different filtering syntax (
-A) and just checks for presence of truthy test_foo.attribute_name. A decorator uses this mechanism for backward compatibility.nose2 splits with_setup(setup, teardown) into two separate decorators, a backward compatible decorator is added.
nottest sets special attribute.
SkipTest from unittest is recommended to be used directly (with the same functionality).
Test scripts are adjusted with minimal changes to run through nose2. Followup cleanup can be used for renaming.
Replace unsupported -m regex by attributes
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