code: def run_eval_shell_script():
      parser = argparse.ArgumentParser(
          prog="run-eval",
          description="Run eval harness",
      )
  
      parser.add_argument("harness_script")
  
      args = parser.parse_args()
  
      base_args = {
          # just "gpus" does not work
          "slurm_gpus_per_task": 8,
          "name": "eval",
          "slurm_account": "stablegpt",
          "slurm_partition": "g40",
          "slurm_cpus_per_gpu": 12,
          # Default timeout is 5 minutes???
          "timeout_min": 0,
      }
  
      executor = submitit.AutoExecutor(folder="./logs")
      executor.update_parameters(**base_args)
  
      # Harness scripts expect the cwd to be the repo root
      spath = Path(args.harness_script)
      repo = str(spath.parent.parent.parent.parent)
      print("repo path:", repo)
      # the eval harness relies on validating cli args, so it's difficult to run
      # directly from Python. Use the harness.sh scripts for now.
      # Also note this needs to be a list of strings.
      harness = CommandFunction(["bash", args.harness_script], cwd=repo)
  
      job = executor.submit(harness)
      print("Submitted job")
      print("See log at:")
      print(f"\t{job.paths.stdout}")
  
      try:
          output = job.result()
          print("Job finished successfully!")
          notify(
              f":white_check_mark: Eval Finished for `{args.harness_script}`"
          )
          return output
      except Exception as ee:  # noqa: F841
          # submitit doesn't seem to have a parent class for their exceptions, so
          # just catch everything. We want to be aware of any failure anyway.
          # If this is noisy we can ignore certain kinds of early failures.
  
          msg = f"""
              :rotating_light: Eval failed for `{args.harness_script}`
  
              See `{job.paths.stderr}`
              """.strip()
          notify(msg)
          raise
  
file_path: lm-evaluation-harness/scripts/run_eval.py
imports: import submitit
  from submitit.helpers import CommandFunction
  import argparse
  from notify import notify
  from pathlib import Path
  from main_eval import main
label_desc: Use image node_id 5 for calling a global function with example usage: run_eval_shell_script() and returns: output