From 52395729e54577374561ce5949f023e2204e869b Mon Sep 17 00:00:00 2001 From: seveirbian <1031180278@qq.com> Date: Thu, 17 Sep 2026 11:29:10 +0800 Subject: [PATCH 1/2] fix(benchmarks/libero) fix server python path error when use uv --- benchmarks/libero/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/libero/scheduler.py b/benchmarks/libero/scheduler.py index 0afcfe73..9dc83f94 100644 --- a/benchmarks/libero/scheduler.py +++ b/benchmarks/libero/scheduler.py @@ -1200,7 +1200,7 @@ def main(argv: list[str] | None = None) -> int: if args.num_trials is None: args.num_trials = 50 args.ckpt_dir = args.ckpt_dir.expanduser().resolve() - args.server_python = args.server_python.expanduser().resolve() + 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() From 63e798965cad87e914ee4ccea846a54339b5eaf8 Mon Sep 17 00:00:00 2001 From: d-finite Date: Thu, 17 Sep 2026 14:38:39 +0800 Subject: [PATCH 2/2] fix(benchmarks): keep the server interpreter unresolved in libero-plus too #33 fixed benchmarks/libero, but benchmarks/libero-plus/scheduler.py carried the identical line and kept the bug. run_eval.sh defaults SERVER_PYTHON=python and expands it with `command -v`, which inside an activated environment yields .venv/bin/python -- a symlink for both `uv venv` and the stdlib `python3 -m venv`. Resolving that symlink reaches the base interpreter, and starting it directly leaves no pyvenv.cfg beside the executable, so CPython never activates the venv and deploy.py comes up without its site-packages. Verified on Linux: for a stdlib venv, .resolve() rewrites .venv/bin/python to /usr/bin/python3.12 and importing a package present only in the venv raises ModuleNotFoundError, while .absolute() keeps sys.prefix pointing at the venv. Also record why these two lines must not use .resolve(). The adjacent comment explains keeping alias paths readable in logs and manifests, which is a different concern and does not cover the interpreter case -- without a note the call is easy to mistake for an oversight and "clean up" back to .resolve(). Co-Authored-By: Claude Opus 5 (1M context) --- benchmarks/libero-plus/scheduler.py | 5 ++++- benchmarks/libero/scheduler.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/benchmarks/libero-plus/scheduler.py b/benchmarks/libero-plus/scheduler.py index 39b6f61d..3cf66f46 100644 --- a/benchmarks/libero-plus/scheduler.py +++ b/benchmarks/libero-plus/scheduler.py @@ -1266,7 +1266,10 @@ def main(argv: list[str] | None = None) -> int: if args.num_trials is None: args.num_trials = 1 args.ckpt_dir = args.ckpt_dir.expanduser().resolve() - args.server_python = args.server_python.expanduser().resolve() + # Never resolve the interpreter: a virtualenv's bin/python is a symlink to + # the base interpreter, and executing that target directly leaves the venv + # undetected, so its site-packages never reach the server's sys.path. + 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() diff --git a/benchmarks/libero/scheduler.py b/benchmarks/libero/scheduler.py index 9dc83f94..0a29c30e 100644 --- a/benchmarks/libero/scheduler.py +++ b/benchmarks/libero/scheduler.py @@ -1200,6 +1200,9 @@ def main(argv: list[str] | None = None) -> int: if args.num_trials is None: args.num_trials = 50 args.ckpt_dir = args.ckpt_dir.expanduser().resolve() + # Never resolve the interpreter: a virtualenv's bin/python is a symlink to + # the base interpreter, and executing that target directly leaves the venv + # undetected, so its site-packages never reach the server's sys.path. 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.