You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use heredoc for fingerprint capture script to avoid escaping bugs
The inline python3 -c approach produced literal \n characters instead of
newlines when passing through bash → srun → bash → python. This caused a
SyntaxError that was silently swallowed by || true, so fingerprints were
never actually collected.
Fix: write the capture script via a bash heredoc (cat <<'EOF') and pipe
to python3 via process substitution. This is immune to quoting/escaping
issues in the srun chain.
Also add two new tests:
- test_embedded_python_is_syntactically_valid: ast.parse() the extracted
Python source to catch syntax errors at test time
- test_embedded_python_produces_json: actually execute the script in a
subprocess to verify it runs end-to-end
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
"'os': next((l.split('=',1)[1].strip('\\\"') for l in Path('/etc/os-release').read_text().splitlines() if l.startswith('PRETTY_NAME=')), platform.platform()) if Path('/etc/os-release').exists() else platform.platform(),"
610
-
"'gpu': gpu_info(),"
611
-
"'python_version': platform.python_version(),"
612
-
"'cuda_version': run('nvcc --version 2>/dev/null | grep release') or 'unavailable',"
613
-
"'torch_version': run('python3 -c \\\"import torch; print(torch.__version__)\\\"') or 'unavailable',"
614
-
"'nccl_version': run('python3 -c \\\"import torch; print(torch.cuda.nccl.version())\\\"') or 'unavailable',"
'os': next((l.split('=',1)[1].strip('"') for l in Path('/etc/os-release').read_text().splitlines() if l.startswith('PRETTY_NAME=')), platform.platform()) if Path('/etc/os-release').exists() else platform.platform(),
607
+
'gpu': gpu_info(),
608
+
'python_version': platform.python_version(),
609
+
'cuda_version': run('nvcc --version 2>/dev/null | grep release') or 'unavailable',
610
+
'torch_version': run('python3 -c "import torch; print(torch.__version__)"') or 'unavailable',
611
+
'nccl_version': run('python3 -c "import torch; print(torch.cuda.nccl.version())"') or 'unavailable',
0 commit comments