results: jobs/20261010-184358-large-ilqr-two-rate/** index/episodes.jsonl leaderboard/*
Browse files- .gitattributes +1 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/breakdown.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/episodes.jsonl +3 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/done.txt +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/episodes.json +0 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/gautschi_launch.py +145 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/sbatch.sh +5 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/job.json +46 -0
- results/jobs/20261010-184358-large-ilqr-two-rate/summary.json +156 -0
- results/leaderboard/large-3__ded6f8168dff.json +46 -0
.gitattributes
CHANGED
|
@@ -73,3 +73,4 @@ results/jobs/20261010-004932-large-base-pp/episodes.jsonl filter=lfs diff=lfs me
|
|
| 73 |
results/jobs/20261009-102724-large-base-mppi1024/episodes.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 74 |
results/jobs/20261009-102724-large-base-mppi1024/gautschi/0/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 75 |
results/jobs/20261009-102724-large-base-mppi1024/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 73 |
results/jobs/20261009-102724-large-base-mppi1024/episodes.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 74 |
results/jobs/20261009-102724-large-base-mppi1024/gautschi/0/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 75 |
results/jobs/20261009-102724-large-base-mppi1024/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
results/jobs/20261010-184358-large-ilqr-two-rate/episodes.jsonl filter=lfs diff=lfs merge=lfs -text
|
results/jobs/20261010-184358-large-ilqr-two-rate/breakdown.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/episodes.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43a0cb965550937ae7db9f30f8b2ce771d8ad7778f92832076a1b67319b753ec
|
| 3 |
+
size 42191769
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/0/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 -J AutoSim-large-large-ilqr-two-rate-1 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/0/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/0/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/0/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/0/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/0/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/1/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 -J AutoSim-large-large-ilqr-two-rate-2 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/1/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/1/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/1/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/1/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/1/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/2/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 --dependency=afterany:16945058 -J AutoSim-large-large-ilqr-two-rate-3 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/2/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/2/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/2/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/2/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/2/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/3/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 --dependency=afterany:16945059 -J AutoSim-large-large-ilqr-two-rate-4 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/3/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/3/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/3/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/3/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/3/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/4/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 --dependency=afterany:16945060 -J AutoSim-large-large-ilqr-two-rate-5 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/4/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/4/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/4/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/4/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/4/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/episodes.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/gautschi_launch.py
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Runs on a Gautschi node (stdlib only): episodes from a queue in parallel workers, one contained Apptainer per episode."""
|
| 2 |
+
import argparse
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import queue
|
| 6 |
+
import shutil
|
| 7 |
+
import subprocess
|
| 8 |
+
import threading
|
| 9 |
+
import time
|
| 10 |
+
|
| 11 |
+
RUN = ("source /opt/ros/humble/setup.bash && source /ws/install/setup.bash"
|
| 12 |
+
" && python3 -m simnode.batch /batch.json /out")
|
| 13 |
+
CUDA_LIB = "/ws/mpc_cuda/libmpc_cuda.so" # built per stack by runner/gautschi.build_stack for gautschi-gpu
|
| 14 |
+
SAMPLE_S = 15
|
| 15 |
+
STAGGER_S = 0.25 # between worker starts: the dev job's one error was a stack starved in the 96-way start burst
|
| 16 |
+
EPISODE_TIMEOUT_S = 1200 # about 4x the slowest lap; a killed episode has no outcome and is retried by the host
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
def worker_cmd(i, work, out, ep, sif, engine, stack, gpu=None):
|
| 20 |
+
"""Private /tmp, HOME, /dev/shm, IPC, PIDs and loopback per episode, plus a distinct ROS_DOMAIN_ID per worker;
|
| 21 |
+
gpu (a host CUDA device) adds the driver and the stack's CUDA MPC kernel."""
|
| 22 |
+
cuda = ["--nv", "--env", f"CUDA_VISIBLE_DEVICES={gpu}", "--env", f"MPC_CUDA_LIB={CUDA_LIB}"] if gpu is not None else []
|
| 23 |
+
if gpu is None and os.path.exists(os.path.join(stack, "mpc_cuda", "libmpc_cuda.so")):
|
| 24 |
+
cuda = ["--env", f"MPC_CUDA_LIB={CUDA_LIB}"] # CPU node: the library's native iLQR solve still loads; its MPPI falls back to numpy
|
| 25 |
+
return ["apptainer", "exec", *cuda, "--contain", "--cleanenv", "--ipc", "--pid", "--net", "--network", "none", "--workdir", work,
|
| 26 |
+
"--env", f"ROS_DOMAIN_ID={i + 1}", "--env", "ROS_HOME=/tmp/ros", "--env", "TMPDIR=/tmp",
|
| 27 |
+
"--bind", f"{engine}:/opt/sim:ro", "--bind", f"{stack}:/ws:ro", "--bind", f"{out}:/out",
|
| 28 |
+
"--bind", f"{ep}:/batch.json:ro", sif, "bash", "-lc", RUN]
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def parse_smi(text):
|
| 32 |
+
"""nvidia-smi 'utilization.gpu, memory.used' csv rows to per-GPU lists."""
|
| 33 |
+
rows = [[int(v) for v in ln.split(",")] for ln in text.strip().splitlines() if ln.strip()]
|
| 34 |
+
return {"gpu_util": [r[0] for r in rows], "gpu_mem_mib": [r[1] for r in rows]}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _solver(logdir):
|
| 38 |
+
"""pathfinder's 'MPC solver: ...' and CUDA fallback lines from the episode's ROS logs."""
|
| 39 |
+
lines = []
|
| 40 |
+
for dp, _, fns in os.walk(logdir):
|
| 41 |
+
for fn in fns:
|
| 42 |
+
try:
|
| 43 |
+
with open(os.path.join(dp, fn), errors="replace") as f:
|
| 44 |
+
lines += [ln.strip() for ln in f if "MPC solver:" in ln or "CUDA MPC unavailable" in ln]
|
| 45 |
+
except OSError:
|
| 46 |
+
pass
|
| 47 |
+
return "\n".join(dict.fromkeys(lines))
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def main(argv=None):
|
| 51 |
+
p = argparse.ArgumentParser()
|
| 52 |
+
for a in ("episodes", "out", "sif", "engine", "stack", "work", "timeline", "done"):
|
| 53 |
+
p.add_argument("--" + a, required=True)
|
| 54 |
+
p.add_argument("--workers", type=int, required=True)
|
| 55 |
+
p.add_argument("--gpus", type=int, default=0)
|
| 56 |
+
a = p.parse_args(argv)
|
| 57 |
+
with open(a.episodes) as f:
|
| 58 |
+
q = queue.Queue()
|
| 59 |
+
for e in json.load(f): # the host already ordered them, longest first
|
| 60 |
+
q.put(e)
|
| 61 |
+
os.makedirs(a.out, exist_ok=True)
|
| 62 |
+
lock, t0 = threading.Lock(), time.time()
|
| 63 |
+
devs = [d for d in os.environ.get("CUDA_VISIBLE_DEVICES", "").split(",") if d][:a.gpus] or [str(n) for n in range(a.gpus)]
|
| 64 |
+
|
| 65 |
+
def log(**ev):
|
| 66 |
+
with lock, open(a.timeline, "a") as f:
|
| 67 |
+
f.write(json.dumps(dict(ev, t=round(time.time() - t0, 3))) + "\n")
|
| 68 |
+
|
| 69 |
+
def worker(i):
|
| 70 |
+
time.sleep(i * STAGGER_S)
|
| 71 |
+
while True:
|
| 72 |
+
try:
|
| 73 |
+
e = q.get_nowait()
|
| 74 |
+
except queue.Empty:
|
| 75 |
+
return
|
| 76 |
+
key, work = e["key"], os.path.join(a.work, e["key"])
|
| 77 |
+
stage, ep = os.path.join(work, "stage"), os.path.join(work, "ep.json")
|
| 78 |
+
os.makedirs(stage)
|
| 79 |
+
with open(ep, "w") as f:
|
| 80 |
+
json.dump([e], f)
|
| 81 |
+
log(ev="start", key=key, worker=i)
|
| 82 |
+
gpu = devs[i % len(devs)] if devs and e["resolved"].get("recipe", {}).get("sim", {}).get("cuda") else None
|
| 83 |
+
limit = EPISODE_TIMEOUT_S * max(1, e["resolved"]["scenario"].get("laps", 1)) # per lap: 5-lap episodes run 5x longer
|
| 84 |
+
try:
|
| 85 |
+
rc = subprocess.run(worker_cmd(i, work, stage, ep, a.sif, a.engine, a.stack, gpu), stdout=subprocess.DEVNULL,
|
| 86 |
+
stderr=subprocess.DEVNULL, timeout=limit).returncode
|
| 87 |
+
except subprocess.TimeoutExpired:
|
| 88 |
+
rc = "timeout"
|
| 89 |
+
solver = _solver(os.path.join(work, "tmp", "ros", "log"))
|
| 90 |
+
if solver and os.path.isdir(os.path.join(stage, key)):
|
| 91 |
+
with open(os.path.join(stage, key, "solver.txt"), "w") as f:
|
| 92 |
+
f.write(solver + "\n")
|
| 93 |
+
if os.path.exists(os.path.join(stage, key, "outcome.json")):
|
| 94 |
+
tmp, dst = os.path.join(a.out, ".tmp-" + key), os.path.join(a.out, key)
|
| 95 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 96 |
+
shutil.copytree(os.path.join(stage, key), tmp)
|
| 97 |
+
shutil.rmtree(dst, ignore_errors=True)
|
| 98 |
+
os.rename(tmp, dst) # the host's rsync sees a key only once its directory is complete
|
| 99 |
+
with lock, open(a.done, "a") as f:
|
| 100 |
+
f.write(key + "\n")
|
| 101 |
+
shutil.rmtree(work, ignore_errors=True)
|
| 102 |
+
log(ev="end", key=key, worker=i, rc=rc, gpu=gpu,
|
| 103 |
+
solver=solver.split("MPC solver: ")[-1] if "MPC solver: " in solver else solver or None)
|
| 104 |
+
|
| 105 |
+
def sampler(stop):
|
| 106 |
+
"""Job CPU use from its cgroup, as busy cores, every SAMPLE_S."""
|
| 107 |
+
try:
|
| 108 |
+
with open("/proc/self/cgroup") as f:
|
| 109 |
+
path = "/sys/fs/cgroup" + f.read().strip().split(":")[-1] + "/cpu.stat"
|
| 110 |
+
prev = None
|
| 111 |
+
while not stop.wait(SAMPLE_S if prev else 0):
|
| 112 |
+
with open(path) as f:
|
| 113 |
+
use = next(int(ln.split()[1]) for ln in f if ln.startswith("usage_usec"))
|
| 114 |
+
now = time.time()
|
| 115 |
+
if prev:
|
| 116 |
+
log(ev="cpu", busy_cores=round((use - prev[0]) / 1e6 / (now - prev[1]), 2))
|
| 117 |
+
prev = (use, now)
|
| 118 |
+
except (OSError, StopIteration, ValueError):
|
| 119 |
+
pass
|
| 120 |
+
|
| 121 |
+
def gpu_sampler(stop):
|
| 122 |
+
"""GPU utilisation and memory of the job's GPUs, every SAMPLE_S."""
|
| 123 |
+
while not stop.wait(SAMPLE_S):
|
| 124 |
+
try:
|
| 125 |
+
p = subprocess.Popen(["nvidia-smi", "--query-gpu=utilization.gpu,memory.used", "--format=csv,noheader,nounits"],
|
| 126 |
+
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True)
|
| 127 |
+
log(ev="gpu", **parse_smi(p.communicate(timeout=30)[0]))
|
| 128 |
+
except Exception: # no driver or a hung query: skip this sample
|
| 129 |
+
pass
|
| 130 |
+
|
| 131 |
+
cores = len(os.sched_getaffinity(0)) if hasattr(os, "sched_getaffinity") else os.cpu_count()
|
| 132 |
+
log(ev="launch", workers=a.workers, cores=cores)
|
| 133 |
+
stop = threading.Event()
|
| 134 |
+
threads = [threading.Thread(target=worker, args=(i,)) for i in range(a.workers)]
|
| 135 |
+
samplers = [sampler] + ([gpu_sampler] if a.gpus else [])
|
| 136 |
+
for t in threads + [threading.Thread(target=f, args=(stop,), daemon=True) for f in samplers]:
|
| 137 |
+
t.start()
|
| 138 |
+
for t in threads:
|
| 139 |
+
t.join()
|
| 140 |
+
stop.set()
|
| 141 |
+
log(ev="done")
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
if __name__ == "__main__":
|
| 145 |
+
main()
|
results/jobs/20261010-184358-large-ilqr-two-rate/gautschi/5/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p highmem -A lilly-rob1 -N 1 -n 1 -c 192 --time 178 --dependency=afterany:16945061 -J AutoSim-large-large-ilqr-two-rate-6 --comment 20261010-184358-large-ilqr-two-rate -o AutoSim/jobs/20261010-184358-large-ilqr-two-rate/5/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/5/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/5/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261010-184358-large-ilqr-two-rate --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8 --stack $HOME/AutoSim/stacks/7b4b63b27ac07841bd716fa940285bfcbe9ad746e835cbf2a0a43ac5287c9e50 --workers 96 --work $W --timeline $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/5/timeline.jsonl --done $HOME/AutoSim/jobs/20261010-184358-large-ilqr-two-rate/5/done.txt
|
results/jobs/20261010-184358-large-ilqr-two-rate/job.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": "20261010-184358-large-ilqr-two-rate",
|
| 3 |
+
"tier": "large",
|
| 4 |
+
"tier_version": 3,
|
| 5 |
+
"recipe": {
|
| 6 |
+
"name": "large-ilqr-two-rate",
|
| 7 |
+
"source": {
|
| 8 |
+
"repo": "AutonomousKart",
|
| 9 |
+
"ref": "worktree:ilqr-two-rate"
|
| 10 |
+
},
|
| 11 |
+
"params": {
|
| 12 |
+
"pathfinder_node": {
|
| 13 |
+
"planner": "ilqr",
|
| 14 |
+
"mpc.num_samples": 16,
|
| 15 |
+
"two_rate.enabled": true,
|
| 16 |
+
"two_rate.divider": 5
|
| 17 |
+
}
|
| 18 |
+
},
|
| 19 |
+
"sim": {
|
| 20 |
+
"tick_mult": 5
|
| 21 |
+
},
|
| 22 |
+
"notes": "large-ilqr-fast plus a 300 Hz inner loop: iLQR solves every 5th tick (60 Hz), a Stanley tracker follows its plan from the delay-predicted pose every tick"
|
| 23 |
+
},
|
| 24 |
+
"user": "shay",
|
| 25 |
+
"notes": "large v3: gradient MPC (tuned iLQR) at 60 Hz plus a 300 Hz two-rate tracker, paired with large-ilqr-fast",
|
| 26 |
+
"where": "gautschi",
|
| 27 |
+
"status": "done",
|
| 28 |
+
"submitted_at": "2026-10-11T01:43:58.658+00:00",
|
| 29 |
+
"started_at": "2026-10-11T01:43:58.659+00:00",
|
| 30 |
+
"finished_at": "2026-10-11T05:34:55.009+00:00",
|
| 31 |
+
"total": 32076,
|
| 32 |
+
"done": 32076,
|
| 33 |
+
"errors": 0,
|
| 34 |
+
"build_log": null,
|
| 35 |
+
"workers": 96,
|
| 36 |
+
"slurm_id": "16945058",
|
| 37 |
+
"slurm_ids": [
|
| 38 |
+
"16945058",
|
| 39 |
+
"16945059",
|
| 40 |
+
"16945060",
|
| 41 |
+
"16945061",
|
| 42 |
+
"16945062",
|
| 43 |
+
"16945063"
|
| 44 |
+
],
|
| 45 |
+
"engine_version": "ded6f8168dff9c052caad6fa1d16ca257ed3716e49b4cd161aa09ae1c01f4af8"
|
| 46 |
+
}
|
results/jobs/20261010-184358-large-ilqr-two-rate/summary.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cte_p50": {
|
| 3 |
+
"value": 0.17598968804668386,
|
| 4 |
+
"worst_kart": null,
|
| 5 |
+
"per_kart": {
|
| 6 |
+
"kart1": 0.18151960716988907,
|
| 7 |
+
"kart2": 0.17699822475111648,
|
| 8 |
+
"kart3": 0.16922874702417448
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
"cte_p90": {
|
| 12 |
+
"value": 0.5399633537267919,
|
| 13 |
+
"worst_kart": null,
|
| 14 |
+
"per_kart": {
|
| 15 |
+
"kart1": 0.5273100157259607,
|
| 16 |
+
"kart2": 0.5750622575702038,
|
| 17 |
+
"kart3": 0.5263529382002208
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"cte_p99": {
|
| 21 |
+
"value": 2.035935782942336,
|
| 22 |
+
"worst_kart": null,
|
| 23 |
+
"per_kart": {
|
| 24 |
+
"kart1": 1.8976918640818043,
|
| 25 |
+
"kart2": 2.327165683313286,
|
| 26 |
+
"kart3": 1.7858509642827674
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"recovery_rate": {
|
| 30 |
+
"value": 0.8223921512047324,
|
| 31 |
+
"worst_kart": null,
|
| 32 |
+
"per_kart": {
|
| 33 |
+
"kart1": 0.8312457912457912,
|
| 34 |
+
"kart2": 0.7857358718646117,
|
| 35 |
+
"kart3": 0.8485925925925926
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"recovery_s_median": {
|
| 39 |
+
"value": 1.4000000000000004,
|
| 40 |
+
"worst_kart": null,
|
| 41 |
+
"per_kart": {
|
| 42 |
+
"kart1": 1.3665000000000003,
|
| 43 |
+
"kart2": 1.4335000000000004,
|
| 44 |
+
"kart3": 1.3999999999999986
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"safety": {
|
| 48 |
+
"value": 0.7137300770719915,
|
| 49 |
+
"worst_kart": null,
|
| 50 |
+
"per_kart": {
|
| 51 |
+
"kart1": 0.7264998076775675,
|
| 52 |
+
"kart2": 0.6818626821913263,
|
| 53 |
+
"kart3": 0.7311154830629183
|
| 54 |
+
}
|
| 55 |
+
},
|
| 56 |
+
"unsafe_lat": {
|
| 57 |
+
"value": 0.0013560596174706802,
|
| 58 |
+
"worst_kart": null,
|
| 59 |
+
"per_kart": {
|
| 60 |
+
"kart1": 0.0015148736962096734,
|
| 61 |
+
"kart2": 0.00040450981624593895,
|
| 62 |
+
"kart3": 0.002109911331295141
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
"unsafe_rate": {
|
| 66 |
+
"value": 0.18996898117372127,
|
| 67 |
+
"worst_kart": null,
|
| 68 |
+
"per_kart": {
|
| 69 |
+
"kart1": 0.17402324256159338,
|
| 70 |
+
"kart2": 0.21957712816605002,
|
| 71 |
+
"kart3": 0.17812203625226486
|
| 72 |
+
}
|
| 73 |
+
},
|
| 74 |
+
"unsafe_travel": {
|
| 75 |
+
"value": 0.0,
|
| 76 |
+
"worst_kart": null,
|
| 77 |
+
"per_kart": {
|
| 78 |
+
"kart1": 0.0,
|
| 79 |
+
"kart2": 0.0,
|
| 80 |
+
"kart3": 0.0
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"unsafe_spin": {
|
| 84 |
+
"value": 7.195205322926365e-05,
|
| 85 |
+
"worst_kart": null,
|
| 86 |
+
"per_kart": {
|
| 87 |
+
"kart1": 0.00010623382621330767,
|
| 88 |
+
"kart2": 1.649691889862417e-05,
|
| 89 |
+
"kart3": 8.948209994359017e-05
|
| 90 |
+
}
|
| 91 |
+
},
|
| 92 |
+
"unsafe_off": {
|
| 93 |
+
"value": 0.1226161057902856,
|
| 94 |
+
"worst_kart": null,
|
| 95 |
+
"per_kart": {
|
| 96 |
+
"kart1": 0.12293843233317131,
|
| 97 |
+
"kart2": 0.12898499099425728,
|
| 98 |
+
"kart3": 0.11610891812996206
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"osc_10": {
|
| 102 |
+
"value": 29.89236764625762,
|
| 103 |
+
"worst_kart": null,
|
| 104 |
+
"per_kart": {
|
| 105 |
+
"kart1": 31.319645298921508,
|
| 106 |
+
"kart2": 26.233010641700286,
|
| 107 |
+
"kart3": 31.92997767809679
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"osc_20": {
|
| 111 |
+
"value": 11.582560270761578,
|
| 112 |
+
"worst_kart": null,
|
| 113 |
+
"per_kart": {
|
| 114 |
+
"kart1": 12.198632782047197,
|
| 115 |
+
"kart2": 9.538854767485223,
|
| 116 |
+
"kart3": 12.911547477989021
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"osc_30": {
|
| 120 |
+
"value": 4.41877215978375,
|
| 121 |
+
"worst_kart": null,
|
| 122 |
+
"per_kart": {
|
| 123 |
+
"kart1": 4.64986838362812,
|
| 124 |
+
"kart2": 3.499846115012644,
|
| 125 |
+
"kart3": 5.064773764197308
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
"laps_pct": {
|
| 129 |
+
"value": 40.631001371742116,
|
| 130 |
+
"worst_kart": null,
|
| 131 |
+
"per_kart": {
|
| 132 |
+
"kart1": 40.49382716049383,
|
| 133 |
+
"kart2": 40.90534979423868,
|
| 134 |
+
"kart3": 40.49382716049383
|
| 135 |
+
}
|
| 136 |
+
},
|
| 137 |
+
"failures": {
|
| 138 |
+
"value": 6954,
|
| 139 |
+
"worst_kart": null,
|
| 140 |
+
"per_kart": {
|
| 141 |
+
"kart1": 2398,
|
| 142 |
+
"kart2": 2498,
|
| 143 |
+
"kart3": 2058
|
| 144 |
+
}
|
| 145 |
+
},
|
| 146 |
+
"n": {
|
| 147 |
+
"value": 32076,
|
| 148 |
+
"worst_kart": null,
|
| 149 |
+
"per_kart": {}
|
| 150 |
+
},
|
| 151 |
+
"errors": {
|
| 152 |
+
"value": 0,
|
| 153 |
+
"worst_kart": null,
|
| 154 |
+
"per_kart": {}
|
| 155 |
+
}
|
| 156 |
+
}
|
results/leaderboard/large-3__ded6f8168dff.json
CHANGED
|
@@ -274,5 +274,51 @@
|
|
| 274 |
"n": 9,
|
| 275 |
"errors": 0
|
| 276 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
}
|
| 278 |
]
|
|
|
|
| 274 |
"n": 9,
|
| 275 |
"errors": 0
|
| 276 |
}
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"job_id": "20261010-184358-large-ilqr-two-rate",
|
| 280 |
+
"recipe": "large-ilqr-two-rate",
|
| 281 |
+
"notes": "large v3: gradient MPC (tuned iLQR) at 60 Hz plus a 300 Hz two-rate tracker, paired with large-ilqr-fast",
|
| 282 |
+
"user": "shay",
|
| 283 |
+
"ran_at": "2026-10-11T05:34:55.009+00:00",
|
| 284 |
+
"duration_s": 13856.35,
|
| 285 |
+
"cte_p50": 0.17598968804668386,
|
| 286 |
+
"cte_p90": 0.5399633537267919,
|
| 287 |
+
"cte_p99": 2.035935782942336,
|
| 288 |
+
"recovery_rate": 0.8223921512047324,
|
| 289 |
+
"recovery_s_median": 1.4000000000000004,
|
| 290 |
+
"safety": 0.7137300770719915,
|
| 291 |
+
"unsafe_lat": 0.0013560596174706802,
|
| 292 |
+
"unsafe_rate": 0.18996898117372127,
|
| 293 |
+
"unsafe_travel": 0.0,
|
| 294 |
+
"unsafe_spin": 7.195205322926365e-05,
|
| 295 |
+
"unsafe_off": 0.1226161057902856,
|
| 296 |
+
"osc_10": 29.89236764625762,
|
| 297 |
+
"osc_20": 11.582560270761578,
|
| 298 |
+
"osc_30": 4.41877215978375,
|
| 299 |
+
"laps_pct": 40.631001371742116,
|
| 300 |
+
"failures": 6954,
|
| 301 |
+
"n": 32076,
|
| 302 |
+
"errors": 0,
|
| 303 |
+
"worst": {
|
| 304 |
+
"cte_p50": 0.18151960716988907,
|
| 305 |
+
"cte_p90": 0.5750622575702038,
|
| 306 |
+
"cte_p99": 2.327165683313286,
|
| 307 |
+
"recovery_rate": 0.7857358718646117,
|
| 308 |
+
"recovery_s_median": 1.4335000000000004,
|
| 309 |
+
"safety": 0.6818626821913263,
|
| 310 |
+
"unsafe_lat": 0.002109911331295141,
|
| 311 |
+
"unsafe_rate": 0.21957712816605002,
|
| 312 |
+
"unsafe_travel": 0.0,
|
| 313 |
+
"unsafe_spin": 0.00010623382621330767,
|
| 314 |
+
"unsafe_off": 0.12898499099425728,
|
| 315 |
+
"osc_10": 31.92997767809679,
|
| 316 |
+
"osc_20": 12.911547477989021,
|
| 317 |
+
"osc_30": 5.064773764197308,
|
| 318 |
+
"laps_pct": 40.49382716049383,
|
| 319 |
+
"failures": 2498,
|
| 320 |
+
"n": 32076,
|
| 321 |
+
"errors": 0
|
| 322 |
+
}
|
| 323 |
}
|
| 324 |
]
|