From 2ec82e91a802a5db4e874da0432ddc5a29c1366c Mon Sep 17 00:00:00 2001 From: Zhaoyi-Yan Date: Mon, 26 May 2025 23:02:32 +0800 Subject: [PATCH] Update run.py self.config is set to None if config is an empty or whitespace-only string. --- opencompass/utils/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencompass/utils/run.py b/opencompass/utils/run.py index 281ecdee..9574450b 100644 --- a/opencompass/utils/run.py +++ b/opencompass/utils/run.py @@ -92,7 +92,8 @@ def get_config_from_arg(args) -> Config: 2. args.models and args.datasets 3. Huggingface parameter groups and args.datasets """ - + # Set to None if config is an empty or whitespace-only string + self.config = None if self.config is not None and not str(self.config).strip() if args.config: config = Config.fromfile(args.config, format_python_code=False) config = try_fill_in_custom_cfgs(config)