PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Keep the case of the AR_WORK_SPACE path (#2417)
Shubham Padkonde11949312ea8e
diff --git a/auto_round/envs.py b/auto_round/envs.pyindex e7a8b706c..368351c09 100644--- a/auto_round/envs.py+++ b/auto_round/envs.py@@ -59,7 +59,7 @@ environment_variables: dict[str, Callable[[], Any]] = {"AR_LOG_LEVEL": lambda: os.getenv("AR_LOG_LEVEL", "INFO").upper(),"AR_ENABLE_COMPILE_PACKING": lambda: os.getenv("AR_ENABLE_COMPILE_PACKING", "0").lower() in ("1", "true", "yes"),"AR_USE_MODELSCOPE": lambda: os.getenv("AR_USE_MODELSCOPE", "False").lower() in ["1", "true"],- "AR_WORK_SPACE": lambda: os.getenv("AR_WORK_SPACE", "ar_work_space").lower(),+ "AR_WORK_SPACE": lambda: os.getenv("AR_WORK_SPACE", "ar_work_space"),"AR_ENABLE_UNIFY_MOE_INPUT_SCALE": lambda: os.getenv("AR_ENABLE_UNIFY_MOE_INPUT_SCALE", "False").lower()in ["1", "true"],"AR_OMP_NUM_THREADS": lambda: os.getenv("AR_OMP_NUM_THREADS", None),diff --git a/test/unit/common/utils/test_envs.py b/test/unit/common/utils/test_envs.pynew file mode 100644index 000000000..58b33bd25--- /dev/null+++ b/test/unit/common/utils/test_envs.py@@ -0,0 +1,11 @@+from auto_round import envs+++def test_work_space_keeps_path_case(monkeypatch):+ monkeypatch.setenv("AR_WORK_SPACE", "/data/MyRun/Work_Space")+ assert envs.AR_WORK_SPACE == "/data/MyRun/Work_Space"+++def test_work_space_default(monkeypatch):+ monkeypatch.delenv("AR_WORK_SPACE", raising=False)+ assert envs.AR_WORK_SPACE == "ar_work_space"