Pick the Python interpreter to invoke eval.py with. The experiment_runner creates /.venv during its setup phase and installs all task-specific dependencies there. eval.py typically imports those same dependencies (numpy, torch, sklearn, etc.), so it must run under th
(work_dir: Path)
| 25 | ) |
| 26 | |
| 27 | |
| 28 | # Files the scorer reads / writes (relative to <workspace>/scoring/) |
| 29 | EVAL_SCRIPT_NAME = "eval.py" |
| 30 | RESULTS_FILE_NAME = "results.json" |
| 31 | LOG_FILE_NAME = "eval_log.txt" |
| 32 | |
| 33 | |
| 34 | def _resolve_python_executable(work_dir: Path) -> str: |
| 35 | """ |
| 36 | Pick the Python interpreter to invoke eval.py with. |
| 37 | |
| 38 | The experiment_runner creates the workspace mode's research environment |
| 39 | during setup and installs task-specific dependencies there. eval.py |
| 40 | typically imports those same dependencies (numpy, torch, sklearn, etc.), |
| 41 | so it must run under the selected research interpreter rather than the |
| 42 | orchestrator's. In embedded mode a root .venv is never used because it may |
| 43 | belong to the task or verifier. |
| 44 | """ |
| 45 | posix, windows = research_python_candidates(work_dir) |
| 46 | if posix.exists() and posix.is_file(): |
| 47 | return str(posix) |