Add explicit compiler location debugging in run_training.py
Browse files- run_training.py +18 -0
run_training.py
CHANGED
|
@@ -12,6 +12,24 @@ import shutil
|
|
| 12 |
import traceback
|
| 13 |
from pathlib import Path
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# ── Training ──────────────────────────────────────────────────────
|
| 16 |
def run_grpo_training():
|
| 17 |
"""Run GRPO training with env-grounded rewards."""
|
|
|
|
| 12 |
import traceback
|
| 13 |
from pathlib import Path
|
| 14 |
|
| 15 |
+
# --- TRITON COMPILER FIX ---
|
| 16 |
+
import subprocess
|
| 17 |
+
try:
|
| 18 |
+
print("Checking for gcc...")
|
| 19 |
+
result = subprocess.run(['which', 'gcc'], capture_output=True, text=True)
|
| 20 |
+
gcc_path = result.stdout.strip()
|
| 21 |
+
print(f"gcc location: {gcc_path or 'NOT FOUND'}")
|
| 22 |
+
if gcc_path:
|
| 23 |
+
os.environ['CC'] = gcc_path
|
| 24 |
+
os.environ['CXX'] = shutil.which('g++') or ''
|
| 25 |
+
result2 = subprocess.run(['gcc', '--version'], capture_output=True, text=True)
|
| 26 |
+
print(f"gcc version:\n{result2.stdout.strip()[:100]}")
|
| 27 |
+
else:
|
| 28 |
+
print("WARNING: gcc still not found in PATH!")
|
| 29 |
+
except Exception as e:
|
| 30 |
+
print(f"Error checking gcc: {e}")
|
| 31 |
+
# ----------------------------
|
| 32 |
+
|
| 33 |
# ── Training ──────────────────────────────────────────────────────
|
| 34 |
def run_grpo_training():
|
| 35 |
"""Run GRPO training with env-grounded rewards."""
|