File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -274,13 +274,22 @@ def _run_post_eval(self, stop_event: threading.Event) -> int:
274274 env_to_set ["EVAL_CONC" ] = str (max (conc_list ))
275275 logger .info ("Eval concurrency (max of %s): %s" , conc_list , env_to_set ["EVAL_CONC" ])
276276
277+ bash_preamble = None
278+ if self .config .setup_script :
279+ script_path = f"/configs/{ self .config .setup_script } "
280+ bash_preamble = (
281+ f"echo 'Running setup script: { script_path } ' && "
282+ f"if [ -f '{ script_path } ' ]; then bash '{ script_path } '; else echo 'WARNING: { script_path } not found'; fi"
283+ )
284+
277285 proc = start_srun_process (
278286 command = cmd ,
279287 nodelist = [self .runtime .nodes .head ],
280288 output = str (eval_log ),
281289 container_image = str (self .runtime .container_image ),
282290 container_mounts = self .runtime .container_mounts ,
283291 env_to_set = env_to_set ,
292+ bash_preamble = bash_preamble ,
284293 )
285294
286295 while proc .poll () is None :
You can’t perform that action at this time.
0 commit comments