Browse Source

!30781 [MD] test_pyfunc_multiprocess_autotune.py - enable AutoTune

Merge pull request !30781 from cathwong/ckw_ut_fixup_map_python_multiproc
feature/build-system-rewrite
i-robot Gitee 4 years ago
parent
commit
70e61e9014
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      tests/ut/python/dataset/test_pyfunc_multiprocess_autotune.py

+ 6
- 0
tests/ut/python/dataset/test_pyfunc_multiprocess_autotune.py 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():


Loading…
Cancel
Save