MCPcopy Create free account
hub / github.com/ChicagoHAI/NeuriCo / _resolve_python_executable

Function _resolve_python_executable

src/core/scorer.py:27–44  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

25)
26
27
28# Files the scorer reads / writes (relative to <workspace>/scoring/)
29EVAL_SCRIPT_NAME = "eval.py"
30RESULTS_FILE_NAME = "results.json"
31LOG_FILE_NAME = "eval_log.txt"
32
33
34def _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&#x27;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&#x27;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)

Callers 1

run_scorerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected