From f390697a5ec59a00d1558f85fbfecd3b7b800c4f Mon Sep 17 00:00:00 2001 From: Linchen Xiao Date: Mon, 14 Oct 2024 15:50:21 +0800 Subject: [PATCH] [Fix] Update dlc runner python env (#1604) --- opencompass/runners/dlc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}')