!30781 [MD] test_pyfunc_multiprocess_autotune.py - enable AutoTune

Merge pull request !30781 from cathwong/ckw_ut_fixup_map_python_multiproc
This commit is contained in:
i-robot 2022-03-02 19:50:29 +00:00 committed by Gitee
commit 70e61e9014
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 0 deletions

View File

@ -138,6 +138,10 @@ class TestPythonMultiprocAutotune:
"""
Run before each test function.
"""
# Enable Dataset AutoTune
self.original_autotune = ds.config.get_enable_autotune()
ds.config.set_enable_autotune(True)
# Reduce memory required by disabling the shared memory optimization
self.mem_original = ds.config.get_enable_shared_mem()
ds.config.set_enable_shared_mem(False)
@ -146,7 +150,9 @@ class TestPythonMultiprocAutotune:
"""
Run after each test function.
"""
# Restore settings
ds.config.set_enable_shared_mem(self.mem_original)
ds.config.set_enable_autotune(self.original_autotune)
@staticmethod
def test_cifar10_pyfunc_pipeline():