Fix probability core dump in MindData coverage test

This commit is contained in:
YangLuo 2021-08-19 14:34:57 +08:00
parent cf7bb217b0
commit 9352935ff6
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import glob
import numpy as np
import mindspore.dataset as ds
import mindspore.dataset.engine.iterators as it
import mindspore.dataset.transforms.py_transforms
import mindspore.dataset.vision.c_transforms as c_vision
import mindspore.dataset.vision.py_transforms as py_vision
@ -311,6 +312,10 @@ def test_deterministic_python_seed_multi_thread():
"""
logger.info("test_deterministic_python_seed_multi_thread")
# Sometimes there are some ITERATORS left in ITERATORS_LIST when run all UTs together,
# and cause core dump and blocking in this UT. Add cleanup() here to fix it.
it._cleanup() # pylint: disable=W0212
# Save original configuration values
num_parallel_workers_original = ds.config.get_num_parallel_workers()
seed_original = ds.config.get_seed()