leezu commented on a change in pull request #19748:
URL: https://github.com/apache/incubator-mxnet/pull/19748#discussion_r559178709
##########
File path: tests/python/unittest/test_gluon_data.py
##########
@@ -158,10 +158,11 @@ def __getitem__(self, key):
def test_multi_worker():
data = Dataset()
for thread_pool in [True, False]:
- loader = gluon.data.DataLoader(data, batch_size=1, num_workers=5,
thread_pool=thread_pool)
- for i, batch in enumerate(loader):
- assert (batch.asnumpy() == i).all()
-
+ for auto_reload in [True, False]:
Review comment:
parametrize is used to parametrize different variations of the test
function. Please read the doc https://docs.pytest.org/en/stable/parametrize.html
It's necessary to ensure parallelization on our CI works smoothly (by
avoiding giant test functions with nested for loops)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]