mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
Update run.py
self.config is set to None if config is an empty or whitespace-only string.
This commit is contained in:
parent
c3779ebfc1
commit
2ec82e91a8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user