results: jobs/20261011-225553-large-ilqr-steer-map-estfix/** index/episodes.jsonl leaderboard/*
Browse files- .gitattributes +4 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/breakdown.json +0 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/episodes.jsonl +3 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/done.txt +0 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/episodes.json +3 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/gautschi_launch.py +145 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/sbatch.sh +5 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/done.txt +0 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/episodes.json +3 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/gautschi_launch.py +145 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/sbatch.sh +5 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/done.txt +0 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/episodes.json +3 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/gautschi_launch.py +145 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/sbatch.sh +5 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/job.json +131 -0
- results/jobs/20261011-225553-large-ilqr-steer-map-estfix/summary.json +156 -0
- results/leaderboard/large-3__9bca45c532ac.json +46 -0
.gitattributes
CHANGED
|
@@ -88,3 +88,7 @@ results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/episodes.jsonl filter
|
|
| 88 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 89 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 90 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/episodes.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 89 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 90 |
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/episodes.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 93 |
+
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/episodes.json filter=lfs diff=lfs merge=lfs -text
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/breakdown.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/episodes.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71e3d117391edd5f74143b020fc57d0dd8bed3a98c7da5bc234490f2960bce96
|
| 3 |
+
size 42329047
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b1c871e1b07c16a127c56915b48e6b26d34679f4a0ff69b581c0d7a002c2ebf
|
| 3 |
+
size 28803280
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/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/20261011-225553-large-ilqr-steer-map-estfix/gautschi/0/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p smallgpu -A lilly-rob1 -N 1 -n 1 -c 64 --gres=gpu:1 --time 616 -J AutoSim-large-large-ilqr-steer-map-estfix-1 --comment 20261011-225553-large-ilqr-steer-map-estfix -o AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/0/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/0/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/0/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225553-large-ilqr-steer-map-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/28ffc21be819015d7f2087e8ddbb2b23c6058925094f0d0984ea9c1b35d7d02a --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/0/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/0/done.txt --gpus 1
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d467f9f44a80d926cb32e6bce89be93d68f1428ca6dd2c9418ad88f137bd6033
|
| 3 |
+
size 28802200
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/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/20261011-225553-large-ilqr-steer-map-estfix/gautschi/1/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p smallgpu -A lilly-rob1 -N 1 -n 1 -c 64 --gres=gpu:1 --time 616 -J AutoSim-large-large-ilqr-steer-map-estfix-2 --comment 20261011-225553-large-ilqr-steer-map-estfix -o AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/1/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/1/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/1/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225553-large-ilqr-steer-map-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/28ffc21be819015d7f2087e8ddbb2b23c6058925094f0d0984ea9c1b35d7d02a --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/1/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/1/done.txt --gpus 1
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b32a5f9b2b6b012d54dc45834115b5cd4d7047b7aeda119f73d7e53c0437fd6e
|
| 3 |
+
size 28813930
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/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/20261011-225553-large-ilqr-steer-map-estfix/gautschi/2/sbatch.sh
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#SBATCH -p smallgpu -A lilly-rob1 -N 1 -n 1 -c 64 --gres=gpu:1 --time 616 --dependency=afterany:16964537 -J AutoSim-large-large-ilqr-steer-map-estfix-3 --comment 20261011-225553-large-ilqr-steer-map-estfix -o AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/2/slurm-%j.out
|
| 3 |
+
W=/dev/shm/AutoSim-$SLURM_JOB_ID
|
| 4 |
+
trap 'rm -rf "$W"' EXIT
|
| 5 |
+
python3 $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/2/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/2/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225553-large-ilqr-steer-map-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/28ffc21be819015d7f2087e8ddbb2b23c6058925094f0d0984ea9c1b35d7d02a --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/2/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225553-large-ilqr-steer-map-estfix/2/done.txt --gpus 1
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/job.json
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": "20261011-225553-large-ilqr-steer-map-estfix",
|
| 3 |
+
"tier": "large",
|
| 4 |
+
"tier_version": 3,
|
| 5 |
+
"recipe": {
|
| 6 |
+
"name": "large-ilqr-steer-map-estfix",
|
| 7 |
+
"source": {
|
| 8 |
+
"repo": "AutonomousKart",
|
| 9 |
+
"ref": "worktree:ilqr-steer-map-estfix"
|
| 10 |
+
},
|
| 11 |
+
"params": {
|
| 12 |
+
"pathfinder_node": {
|
| 13 |
+
"planner": "ilqr",
|
| 14 |
+
"mpc.num_samples": 16,
|
| 15 |
+
"mpc.use_steer_map": true,
|
| 16 |
+
"mpc.steer_map_cmd_deg": [
|
| 17 |
+
-60.0,
|
| 18 |
+
-30.0,
|
| 19 |
+
-18.0,
|
| 20 |
+
-15.0,
|
| 21 |
+
-12.0,
|
| 22 |
+
-9.0,
|
| 23 |
+
-6.0,
|
| 24 |
+
-3.0,
|
| 25 |
+
0.0,
|
| 26 |
+
3.0,
|
| 27 |
+
6.0,
|
| 28 |
+
9.0,
|
| 29 |
+
12.0,
|
| 30 |
+
15.0,
|
| 31 |
+
18.0,
|
| 32 |
+
30.0,
|
| 33 |
+
60.0
|
| 34 |
+
],
|
| 35 |
+
"mpc.adaptive_gain.enabled": true
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"sim": {},
|
| 39 |
+
"notes": "per-kart predefined maps with the steady-gated online gain on (0.5 s, 1.5 deg)",
|
| 40 |
+
"params_by_kart": {
|
| 41 |
+
"kart1": {
|
| 42 |
+
"pathfinder_node": {
|
| 43 |
+
"mpc.steer_map_wheel_deg": [
|
| 44 |
+
-20.1519,
|
| 45 |
+
-20.1519,
|
| 46 |
+
-12.5298,
|
| 47 |
+
-10.6243,
|
| 48 |
+
-8.7187,
|
| 49 |
+
-5.2384,
|
| 50 |
+
-2.8452,
|
| 51 |
+
-1.6118,
|
| 52 |
+
0.0,
|
| 53 |
+
1.3773,
|
| 54 |
+
3.6202,
|
| 55 |
+
7.0877,
|
| 56 |
+
10.4902,
|
| 57 |
+
12.3958,
|
| 58 |
+
14.3013,
|
| 59 |
+
21.9234,
|
| 60 |
+
21.9234
|
| 61 |
+
]
|
| 62 |
+
}
|
| 63 |
+
},
|
| 64 |
+
"kart2": {
|
| 65 |
+
"pathfinder_node": {
|
| 66 |
+
"mpc.steer_map_wheel_deg": [
|
| 67 |
+
-13.1619,
|
| 68 |
+
-13.1619,
|
| 69 |
+
-8.8806,
|
| 70 |
+
-7.1977,
|
| 71 |
+
-4.9993,
|
| 72 |
+
-3.1573,
|
| 73 |
+
-2.0998,
|
| 74 |
+
-0.9566,
|
| 75 |
+
0.0,
|
| 76 |
+
1.0131,
|
| 77 |
+
2.0406,
|
| 78 |
+
3.2715,
|
| 79 |
+
4.8893,
|
| 80 |
+
7.0851,
|
| 81 |
+
9.1998,
|
| 82 |
+
13.4811,
|
| 83 |
+
13.4811
|
| 84 |
+
]
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"kart3": {
|
| 88 |
+
"pathfinder_node": {
|
| 89 |
+
"mpc.steer_map_wheel_deg": [
|
| 90 |
+
-18.7967,
|
| 91 |
+
-18.7967,
|
| 92 |
+
-12.3583,
|
| 93 |
+
-10.7487,
|
| 94 |
+
-9.139,
|
| 95 |
+
-5.4234,
|
| 96 |
+
-2.7691,
|
| 97 |
+
-1.3685,
|
| 98 |
+
0.0,
|
| 99 |
+
1.3738,
|
| 100 |
+
2.8156,
|
| 101 |
+
5.0623,
|
| 102 |
+
9.2253,
|
| 103 |
+
10.8349,
|
| 104 |
+
12.4445,
|
| 105 |
+
18.883,
|
| 106 |
+
18.883
|
| 107 |
+
]
|
| 108 |
+
}
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
},
|
| 112 |
+
"user": "shay",
|
| 113 |
+
"notes": "large v3: gradient MPC, predefined per-kart steer map with the steady-gated online gain (estfix), smallgpu",
|
| 114 |
+
"where": "gautschi-gpu",
|
| 115 |
+
"status": "done",
|
| 116 |
+
"submitted_at": "2026-10-12T05:55:53.464+00:00",
|
| 117 |
+
"started_at": "2026-10-12T05:55:53.464+00:00",
|
| 118 |
+
"finished_at": "2026-10-13T17:29:43.097+00:00",
|
| 119 |
+
"total": 32076,
|
| 120 |
+
"done": 32076,
|
| 121 |
+
"errors": 0,
|
| 122 |
+
"build_log": null,
|
| 123 |
+
"workers": 32,
|
| 124 |
+
"slurm_id": "16964537",
|
| 125 |
+
"slurm_ids": [
|
| 126 |
+
"16964537",
|
| 127 |
+
"16964539",
|
| 128 |
+
"16964544"
|
| 129 |
+
],
|
| 130 |
+
"engine_version": "9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509"
|
| 131 |
+
}
|
results/jobs/20261011-225553-large-ilqr-steer-map-estfix/summary.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cte_p50": {
|
| 3 |
+
"value": 0.2817100612407872,
|
| 4 |
+
"worst_kart": null,
|
| 5 |
+
"per_kart": {
|
| 6 |
+
"kart1": 0.2702489542019287,
|
| 7 |
+
"kart2": 0.30179797941554753,
|
| 8 |
+
"kart3": 0.2748781157585124
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
"cte_p90": {
|
| 12 |
+
"value": 0.805822948521741,
|
| 13 |
+
"worst_kart": null,
|
| 14 |
+
"per_kart": {
|
| 15 |
+
"kart1": 0.7421420146052674,
|
| 16 |
+
"kart2": 0.8819207525244227,
|
| 17 |
+
"kart3": 0.7978353033371168
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"cte_p99": {
|
| 21 |
+
"value": 2.1877923074120083,
|
| 22 |
+
"worst_kart": null,
|
| 23 |
+
"per_kart": {
|
| 24 |
+
"kart1": 1.953456720407211,
|
| 25 |
+
"kart2": 2.385366792630809,
|
| 26 |
+
"kart3": 2.2266040061208634
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"recovery_rate": {
|
| 30 |
+
"value": 0.8070012694072844,
|
| 31 |
+
"worst_kart": null,
|
| 32 |
+
"per_kart": {
|
| 33 |
+
"kart1": 0.8235948803561491,
|
| 34 |
+
"kart2": 0.7744092732946946,
|
| 35 |
+
"kart3": 0.8222391469916223
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"recovery_s_median": {
|
| 39 |
+
"value": 2.9335000000000004,
|
| 40 |
+
"worst_kart": null,
|
| 41 |
+
"per_kart": {
|
| 42 |
+
"kart1": 2.7834999999999983,
|
| 43 |
+
"kart2": 3.2835,
|
| 44 |
+
"kart3": 2.8665000000000003
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"safety": {
|
| 48 |
+
"value": 0.8086810061114125,
|
| 49 |
+
"worst_kart": null,
|
| 50 |
+
"per_kart": {
|
| 51 |
+
"kart1": 0.823652230320344,
|
| 52 |
+
"kart2": 0.7905752848107984,
|
| 53 |
+
"kart3": 0.8111795572374437
|
| 54 |
+
}
|
| 55 |
+
},
|
| 56 |
+
"unsafe_lat": {
|
| 57 |
+
"value": 0.000510882290301797,
|
| 58 |
+
"worst_kart": null,
|
| 59 |
+
"per_kart": {
|
| 60 |
+
"kart1": 0.0007090700246219074,
|
| 61 |
+
"kart2": 5.8520491018465744e-05,
|
| 62 |
+
"kart3": 0.0007650200396363604
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
"unsafe_rate": {
|
| 66 |
+
"value": 0.07713981915459252,
|
| 67 |
+
"worst_kart": null,
|
| 68 |
+
"per_kart": {
|
| 69 |
+
"kart1": 0.06303352622826282,
|
| 70 |
+
"kart2": 0.0898471847634355,
|
| 71 |
+
"kart3": 0.0793094891201471
|
| 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": 2.6361441358287303e-05,
|
| 85 |
+
"worst_kart": null,
|
| 86 |
+
"per_kart": {
|
| 87 |
+
"kart1": 4.5097674065048724e-05,
|
| 88 |
+
"kart2": 2.5226443504550773e-06,
|
| 89 |
+
"kart3": 3.0714628932696814e-05
|
| 90 |
+
}
|
| 91 |
+
},
|
| 92 |
+
"unsafe_off": {
|
| 93 |
+
"value": 0.12498032644616845,
|
| 94 |
+
"worst_kart": null,
|
| 95 |
+
"per_kart": {
|
| 96 |
+
"kart1": 0.12239308910021571,
|
| 97 |
+
"kart2": 0.13165448726224302,
|
| 98 |
+
"kart3": 0.12086357605605744
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"osc_10": {
|
| 102 |
+
"value": 29.408778286303555,
|
| 103 |
+
"worst_kart": null,
|
| 104 |
+
"per_kart": {
|
| 105 |
+
"kart1": 30.30832645213486,
|
| 106 |
+
"kart2": 27.064293848350204,
|
| 107 |
+
"kart3": 30.865029590799338
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"osc_20": {
|
| 111 |
+
"value": 12.980866603779603,
|
| 112 |
+
"worst_kart": null,
|
| 113 |
+
"per_kart": {
|
| 114 |
+
"kart1": 13.491091023412205,
|
| 115 |
+
"kart2": 10.620658985649271,
|
| 116 |
+
"kart3": 14.877879067810328
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"osc_30": {
|
| 120 |
+
"value": 5.4347761037568,
|
| 121 |
+
"worst_kart": null,
|
| 122 |
+
"per_kart": {
|
| 123 |
+
"kart1": 5.771823132219132,
|
| 124 |
+
"kart2": 3.7074272443177043,
|
| 125 |
+
"kart3": 6.862775159686549
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
"laps_pct": {
|
| 129 |
+
"value": 51.96159122085048,
|
| 130 |
+
"worst_kart": null,
|
| 131 |
+
"per_kart": {
|
| 132 |
+
"kart1": 52.42798353909465,
|
| 133 |
+
"kart2": 55.55555555555556,
|
| 134 |
+
"kart3": 47.901234567901234
|
| 135 |
+
}
|
| 136 |
+
},
|
| 137 |
+
"failures": {
|
| 138 |
+
"value": 4509,
|
| 139 |
+
"worst_kart": null,
|
| 140 |
+
"per_kart": {
|
| 141 |
+
"kart1": 1469,
|
| 142 |
+
"kart2": 1688,
|
| 143 |
+
"kart3": 1352
|
| 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__9bca45c532ac.json
CHANGED
|
@@ -44,5 +44,51 @@
|
|
| 44 |
"n": 32076,
|
| 45 |
"errors": 0
|
| 46 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
}
|
| 48 |
]
|
|
|
|
| 44 |
"n": 32076,
|
| 45 |
"errors": 0
|
| 46 |
}
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"job_id": "20261011-225553-large-ilqr-steer-map-estfix",
|
| 50 |
+
"recipe": "large-ilqr-steer-map-estfix",
|
| 51 |
+
"notes": "large v3: gradient MPC, predefined per-kart steer map with the steady-gated online gain (estfix), smallgpu",
|
| 52 |
+
"user": "shay",
|
| 53 |
+
"ran_at": "2026-10-13T17:29:43.097+00:00",
|
| 54 |
+
"duration_s": 128029.633,
|
| 55 |
+
"cte_p50": 0.2817100612407872,
|
| 56 |
+
"cte_p90": 0.805822948521741,
|
| 57 |
+
"cte_p99": 2.1877923074120083,
|
| 58 |
+
"recovery_rate": 0.8070012694072844,
|
| 59 |
+
"recovery_s_median": 2.9335000000000004,
|
| 60 |
+
"safety": 0.8086810061114125,
|
| 61 |
+
"unsafe_lat": 0.000510882290301797,
|
| 62 |
+
"unsafe_rate": 0.07713981915459252,
|
| 63 |
+
"unsafe_travel": 0.0,
|
| 64 |
+
"unsafe_spin": 2.6361441358287303e-05,
|
| 65 |
+
"unsafe_off": 0.12498032644616845,
|
| 66 |
+
"osc_10": 29.408778286303555,
|
| 67 |
+
"osc_20": 12.980866603779603,
|
| 68 |
+
"osc_30": 5.4347761037568,
|
| 69 |
+
"laps_pct": 51.96159122085048,
|
| 70 |
+
"failures": 4509,
|
| 71 |
+
"n": 32076,
|
| 72 |
+
"errors": 0,
|
| 73 |
+
"worst": {
|
| 74 |
+
"cte_p50": 0.30179797941554753,
|
| 75 |
+
"cte_p90": 0.8819207525244227,
|
| 76 |
+
"cte_p99": 2.385366792630809,
|
| 77 |
+
"recovery_rate": 0.7744092732946946,
|
| 78 |
+
"recovery_s_median": 3.2835,
|
| 79 |
+
"safety": 0.7905752848107984,
|
| 80 |
+
"unsafe_lat": 0.0007650200396363604,
|
| 81 |
+
"unsafe_rate": 0.0898471847634355,
|
| 82 |
+
"unsafe_travel": 0.0,
|
| 83 |
+
"unsafe_spin": 4.5097674065048724e-05,
|
| 84 |
+
"unsafe_off": 0.13165448726224302,
|
| 85 |
+
"osc_10": 30.865029590799338,
|
| 86 |
+
"osc_20": 14.877879067810328,
|
| 87 |
+
"osc_30": 6.862775159686549,
|
| 88 |
+
"laps_pct": 47.901234567901234,
|
| 89 |
+
"failures": 1688,
|
| 90 |
+
"n": 32076,
|
| 91 |
+
"errors": 0
|
| 92 |
+
}
|
| 93 |
}
|
| 94 |
]
|