fix(benchmarks/libero) fix server python path error when using uv - #33
1 commit merged into
Conversation
wayrise
left a comment
There was a problem hiding this comment.
Approving — this is a correct fix for a real bug, and it hits the setup path the repo itself documents.
run_eval.sh defaults SERVER_PYTHON=python and expands it with command -v, which inside an activated environment yields .venv/bin/python. That is a symlink for both uv venv and the stdlib python3 -m venv .venv shown in the README (symlinks are the POSIX default). .resolve() followed it to the base interpreter, and launching the base interpreter directly means there is no pyvenv.cfg beside it, so CPython never activates the venv and deploy.py starts without the venv's site-packages. .absolute() keeps the symlink path intact, and it also makes this line consistent with libero_python / libero_path right below.
No regressions that I can find: _preflight uses is_file(), which follows symlinks either way; _start_servers inherits the full environment with cwd=REPO_ROOT and sets no PYTHONHOME; and server_python is never written to manifest.json, so resume signatures and existing manifests are unaffected.
Two follow-ups, neither blocking:
-
benchmarks/libero-plus/scheduler.py:1269still has the identicalargs.server_python = args.server_python.expanduser().resolve(). That block is otherwise a copy of the one you changed (the only other difference is thenum_trialsdefault), andbenchmarks/libero-plus/run_eval.shcarries the sameSERVER_PYTHON:-pythondefault, so the same bug is reachable there. It is the only other occurrence in the repo. Worth folding into this PR so the sibling benchmark doesn't silently keep it. -
The new line now sits above the comment that explains
libero_python:
args.server_python = args.server_python.expanduser().absolute()
# Preserve the public default aliases in logs and manifests instead of
# exposing an implementation-specific physical environment directory.
args.libero_python = args.libero_python.expanduser().absolute()That comment is about keeping alias paths readable in logs and manifests, which isn't the reason here — server_python never reaches the manifest. Moving the line below the comment and extending it, or adding a short note about venv detection, would stop someone from "cleaning" it back to .resolve() later.
|
Thanks for catching this — I've taken the follow-ups off your plate rather than sending you back around for them. #35 carries your commit unchanged and adds the While I was in there I also confirmed the failure mode on Linux: with a stdlib venv, |
7c5861e
fix server python path bug when using uv or venv.