diff --git a/opencompass/runners/dlc.py b/opencompass/runners/dlc.py index 224ef430..87fee8c4 100644 --- a/opencompass/runners/dlc.py +++ b/opencompass/runners/dlc.py @@ -182,7 +182,11 @@ class DLCRunner(BaseRunner): cfg_path=param_file, template=tmpl) cmd = get_cmd() - + # Use specified python env instead of sys.executable + if self.aliyun_cfg['python_env_path']: + cmd = cmd.replace( + sys.executable, + f'{self.aliyun_cfg["python_env_path"]}/bin/python') logger = get_logger() logger.debug(f'Running command: {cmd}')