From 5b38d8a9f29b143c51ad534671ba0cf0a09be1eb Mon Sep 17 00:00:00 2001 From: xin3he Date: Mon, 8 Jul 2024 15:10:03 +0800 Subject: [PATCH] fix bug Signed-off-by: xin3he --- neural_compressor/common/base_config.py | 1 + test/3x/common/test_utility.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/neural_compressor/common/base_config.py b/neural_compressor/common/base_config.py index 66565362e5b..cad6a2cdf92 100644 --- a/neural_compressor/common/base_config.py +++ b/neural_compressor/common/base_config.py @@ -621,6 +621,7 @@ class Options: def __init__(self, random_seed=1978, workspace=DEFAULT_WORKSPACE, resume_from=None, tensorboard=False): """Init an Option object.""" + os.makedirs(self._workspace, exist_ok=True) self.random_seed = random_seed self.workspace = workspace self.resume_from = resume_from diff --git a/test/3x/common/test_utility.py b/test/3x/common/test_utility.py index 433569716a9..b605b3b506b 100644 --- a/test/3x/common/test_utility.py +++ b/test/3x/common/test_utility.py @@ -76,7 +76,6 @@ def test_set_tensorboard(self): class TestCPUInfo(unittest.TestCase): def test_cpu_info(self): cpu_info = CpuInfo() - assert cpu_info.cores_per_socket > 0, "CPU count should be greater than 0" assert isinstance(cpu_info.bf16, bool), "bf16 should be a boolean" assert isinstance(cpu_info.vnni, bool), "avx512 should be a boolean"