leezu commented on a change in pull request #19748:
URL: https://github.com/apache/incubator-mxnet/pull/19748#discussion_r559178857
##########
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:
Here you should use
```
@pytest.mark.parametrize("auto_reload", [True, False])
@pytest.mark.parametrize("thread_pool", [True, False])
```
instead of nested for loop
----------------------------------------------------------------
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]