Revert "[Fix] Use sys.executable instead of hardcoded python (#165633)"

This reverts commit 37f3ba274a8ccebc6b3409f52cf068a8b23617d4.

Reverted https://github.com/pytorch/pytorch/pull/165633 on behalf of https://github.com/malfet due to Looks like it broke test_collect_callgrind in slow workflows, see e0fe37fa68/1 ([comment](https://github.com/pytorch/pytorch/pull/165633#issuecomment-3413290813))
This commit is contained in:
PyTorch MergeBot
2025-10-17 00:06:40 +00:00
parent e0fe37fa68
commit 470e2f61c3

View File

@ -640,7 +640,7 @@ class _ValgrindWrapper:
stat_log=stat_log,
bindings=self._bindings_module))
run_loop_cmd = [sys.executable, script_file]
run_loop_cmd = ["python", script_file]
else:
if collect_baseline:
raise AssertionError("collect_baseline must be False for non-Python timers")