results: jobs/20261011-225548-large-ilqr-steer-learn-estfix/** index/episodes.jsonl leaderboard/*
Browse files- .gitattributes +4 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/breakdown.json +0 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/episodes.jsonl +3 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/done.txt +0 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/episodes.json +3 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/gautschi_launch.py +145 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/sbatch.sh +5 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/done.txt +0 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/episodes.json +3 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/gautschi_launch.py +145 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/sbatch.sh +5 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/done.txt +0 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/episodes.json +3 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/gautschi_launch.py +145 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/sbatch.sh +5 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/job.json +132 -0
- results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/summary.json +156 -0
- results/leaderboard/large-3__9bca45c532ac.json +48 -0
.gitattributes
CHANGED
|
@@ -84,3 +84,7 @@ results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/0/episodes.json filte
|
|
| 84 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 85 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/3/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 86 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/2/episodes.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/1/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 85 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/3/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 86 |
results/jobs/20261011-034521-large-ilqr-steer-map/gautschi/2/episodes.json filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/episodes.jsonl 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
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/breakdown.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/episodes.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b2deaebd8b7f5ea4dcf91524ba0908594ff85417de02e6bff77b7bea5e58db9
|
| 3 |
+
size 42416109
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/0/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e184efc05736f32aab5cc7f036f9fbe8ec05215178671477f7f0300ed2198e44
|
| 3 |
+
size 29740702
|
results/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-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-learn-estfix-1 --comment 20261011-225548-large-ilqr-steer-learn-estfix -o AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-estfix/0/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/0/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225548-large-ilqr-steer-learn-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/96ef8f9aca3519957a2d4007c6192adf52e46ecc2ed27fb8b7bf40148d424805 --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/0/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/0/done.txt --gpus 1
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/1/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b677992f312b129161d02df245de710957df67366f34f936932a6340e50c50d2
|
| 3 |
+
size 29740432
|
results/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-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-learn-estfix-2 --comment 20261011-225548-large-ilqr-steer-learn-estfix -o AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-estfix/1/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/1/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225548-large-ilqr-steer-learn-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/96ef8f9aca3519957a2d4007c6192adf52e46ecc2ed27fb8b7bf40148d424805 --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/1/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/1/done.txt --gpus 1
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/done.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/gautschi/2/episodes.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0fe44069efcb1c54ce9f0147ee8e772f655f4beae24f713d8c6f26269fa9598
|
| 3 |
+
size 29750272
|
results/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-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:16964536 -J AutoSim-large-large-ilqr-steer-learn-estfix-3 --comment 20261011-225548-large-ilqr-steer-learn-estfix -o AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-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-225548-large-ilqr-steer-learn-estfix/2/gautschi_launch.py --episodes $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/2/episodes.json --out /scratch/gautschi/manors/AutoSim/out/20261011-225548-large-ilqr-steer-learn-estfix --sif $HOME/AutoSim/images/AutoSim-99d206f40cb1.sif --engine $HOME/AutoSim/engine/9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509 --stack $HOME/AutoSim/stacks/96ef8f9aca3519957a2d4007c6192adf52e46ecc2ed27fb8b7bf40148d424805 --workers 32 --work $W --timeline $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/2/timeline.jsonl --done $HOME/AutoSim/jobs/20261011-225548-large-ilqr-steer-learn-estfix/2/done.txt --gpus 1
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/job.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"id": "20261011-225548-large-ilqr-steer-learn-estfix",
|
| 3 |
+
"tier": "large",
|
| 4 |
+
"tier_version": 3,
|
| 5 |
+
"recipe": {
|
| 6 |
+
"name": "large-ilqr-steer-learn-estfix",
|
| 7 |
+
"source": {
|
| 8 |
+
"repo": "AutonomousKart",
|
| 9 |
+
"ref": "worktree:ilqr-steer-learn-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.map": true,
|
| 36 |
+
"mpc.adaptive_gain.understeer": false
|
| 37 |
+
}
|
| 38 |
+
},
|
| 39 |
+
"sim": {},
|
| 40 |
+
"notes": "dev-ilqr-steer-learn with the steady-state gate on the learned map's RLS (0.5 s, 1.5 deg): samples only once the command has held, the held command is the regressor",
|
| 41 |
+
"params_by_kart": {
|
| 42 |
+
"kart1": {
|
| 43 |
+
"pathfinder_node": {
|
| 44 |
+
"mpc.steer_map_wheel_deg": [
|
| 45 |
+
-38.112,
|
| 46 |
+
-19.056,
|
| 47 |
+
-11.4336,
|
| 48 |
+
-9.528,
|
| 49 |
+
-7.6224,
|
| 50 |
+
-5.7168,
|
| 51 |
+
-3.8112,
|
| 52 |
+
-1.9056,
|
| 53 |
+
0.0,
|
| 54 |
+
1.9056,
|
| 55 |
+
3.8112,
|
| 56 |
+
5.7168,
|
| 57 |
+
7.6224,
|
| 58 |
+
9.528,
|
| 59 |
+
11.4336,
|
| 60 |
+
19.056,
|
| 61 |
+
38.112
|
| 62 |
+
]
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
"kart2": {
|
| 66 |
+
"pathfinder_node": {
|
| 67 |
+
"mpc.steer_map_wheel_deg": [
|
| 68 |
+
-21.408,
|
| 69 |
+
-10.704,
|
| 70 |
+
-6.4224,
|
| 71 |
+
-5.352,
|
| 72 |
+
-4.2816,
|
| 73 |
+
-3.2112,
|
| 74 |
+
-2.1408,
|
| 75 |
+
-1.0704,
|
| 76 |
+
0.0,
|
| 77 |
+
1.0704,
|
| 78 |
+
2.1408,
|
| 79 |
+
3.2112,
|
| 80 |
+
4.2816,
|
| 81 |
+
5.352,
|
| 82 |
+
6.4224,
|
| 83 |
+
10.704,
|
| 84 |
+
21.408
|
| 85 |
+
]
|
| 86 |
+
}
|
| 87 |
+
},
|
| 88 |
+
"kart3": {
|
| 89 |
+
"pathfinder_node": {
|
| 90 |
+
"mpc.steer_map_wheel_deg": [
|
| 91 |
+
-32.19,
|
| 92 |
+
-16.095,
|
| 93 |
+
-9.657,
|
| 94 |
+
-8.0475,
|
| 95 |
+
-6.438,
|
| 96 |
+
-4.8285,
|
| 97 |
+
-3.219,
|
| 98 |
+
-1.6095,
|
| 99 |
+
0.0,
|
| 100 |
+
1.6095,
|
| 101 |
+
3.219,
|
| 102 |
+
4.8285,
|
| 103 |
+
6.438,
|
| 104 |
+
8.0475,
|
| 105 |
+
9.657,
|
| 106 |
+
16.095,
|
| 107 |
+
32.19
|
| 108 |
+
]
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
},
|
| 113 |
+
"user": "shay",
|
| 114 |
+
"notes": "large v3: gradient MPC, learned steer map with the steady-state gate (estfix), smallgpu",
|
| 115 |
+
"where": "gautschi-gpu",
|
| 116 |
+
"status": "done",
|
| 117 |
+
"submitted_at": "2026-10-12T05:55:48.418+00:00",
|
| 118 |
+
"started_at": "2026-10-12T05:55:48.418+00:00",
|
| 119 |
+
"finished_at": "2026-10-13T07:04:16.284+00:00",
|
| 120 |
+
"total": 32076,
|
| 121 |
+
"done": 32076,
|
| 122 |
+
"errors": 0,
|
| 123 |
+
"build_log": null,
|
| 124 |
+
"workers": 32,
|
| 125 |
+
"slurm_id": "16964536",
|
| 126 |
+
"slurm_ids": [
|
| 127 |
+
"16964536",
|
| 128 |
+
"16964538",
|
| 129 |
+
"16964543"
|
| 130 |
+
],
|
| 131 |
+
"engine_version": "9bca45c532ac8a0461a4f8bb50d398f7167c74d3fd8b543b0bb75ad5f4ae5509"
|
| 132 |
+
}
|
results/jobs/20261011-225548-large-ilqr-steer-learn-estfix/summary.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cte_p50": {
|
| 3 |
+
"value": 0.26512092744463145,
|
| 4 |
+
"worst_kart": null,
|
| 5 |
+
"per_kart": {
|
| 6 |
+
"kart1": 0.26379544493083873,
|
| 7 |
+
"kart2": 0.2680266975531274,
|
| 8 |
+
"kart3": 0.26364802885571015
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
"cte_p90": {
|
| 12 |
+
"value": 0.6748502332304815,
|
| 13 |
+
"worst_kart": null,
|
| 14 |
+
"per_kart": {
|
| 15 |
+
"kart1": 0.6276199017074359,
|
| 16 |
+
"kart2": 0.7092344637468333,
|
| 17 |
+
"kart3": 0.6990401541027134
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"cte_p99": {
|
| 21 |
+
"value": 2.04869898335375,
|
| 22 |
+
"worst_kart": null,
|
| 23 |
+
"per_kart": {
|
| 24 |
+
"kart1": 1.6869508083115374,
|
| 25 |
+
"kart2": 2.184738261599302,
|
| 26 |
+
"kart3": 2.2087851212449867
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"recovery_rate": {
|
| 30 |
+
"value": 0.8742248913627264,
|
| 31 |
+
"worst_kart": null,
|
| 32 |
+
"per_kart": {
|
| 33 |
+
"kart1": 0.8782693377851976,
|
| 34 |
+
"kart2": 0.8817060484470204,
|
| 35 |
+
"kart3": 0.8621267519804997
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"recovery_s_median": {
|
| 39 |
+
"value": 1.9335000000000004,
|
| 40 |
+
"worst_kart": null,
|
| 41 |
+
"per_kart": {
|
| 42 |
+
"kart1": 1.799999999999999,
|
| 43 |
+
"kart2": 2.167,
|
| 44 |
+
"kart3": 1.9000000000000004
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"safety": {
|
| 48 |
+
"value": 0.7890387149501775,
|
| 49 |
+
"worst_kart": null,
|
| 50 |
+
"per_kart": {
|
| 51 |
+
"kart1": 0.8103661538351755,
|
| 52 |
+
"kart2": 0.7661554784881479,
|
| 53 |
+
"kart3": 0.7897140447868718
|
| 54 |
+
}
|
| 55 |
+
},
|
| 56 |
+
"unsafe_lat": {
|
| 57 |
+
"value": 0.0006253486982745151,
|
| 58 |
+
"worst_kart": null,
|
| 59 |
+
"per_kart": {
|
| 60 |
+
"kart1": 0.0007450239189413128,
|
| 61 |
+
"kart2": 0.00013366857170998237,
|
| 62 |
+
"kart3": 0.0010117707755495067
|
| 63 |
+
}
|
| 64 |
+
},
|
| 65 |
+
"unsafe_rate": {
|
| 66 |
+
"value": 0.10050115213827407,
|
| 67 |
+
"worst_kart": null,
|
| 68 |
+
"per_kart": {
|
| 69 |
+
"kart1": 0.07588532081887545,
|
| 70 |
+
"kart2": 0.12392850642102259,
|
| 71 |
+
"kart3": 0.10286486896697415
|
| 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": 3.259072659094423e-05,
|
| 85 |
+
"worst_kart": null,
|
| 86 |
+
"per_kart": {
|
| 87 |
+
"kart1": 4.7229254490340136e-05,
|
| 88 |
+
"kart2": 6.23850788741476e-06,
|
| 89 |
+
"kart3": 4.4267373088987284e-05
|
| 90 |
+
}
|
| 91 |
+
},
|
| 92 |
+
"unsafe_off": {
|
| 93 |
+
"value": 0.12417629554311432,
|
| 94 |
+
"worst_kart": null,
|
| 95 |
+
"per_kart": {
|
| 96 |
+
"kart1": 0.12396613616339593,
|
| 97 |
+
"kart2": 0.12694248181295464,
|
| 98 |
+
"kart3": 0.12149355909022447
|
| 99 |
+
}
|
| 100 |
+
},
|
| 101 |
+
"osc_10": {
|
| 102 |
+
"value": 31.06384130600107,
|
| 103 |
+
"worst_kart": null,
|
| 104 |
+
"per_kart": {
|
| 105 |
+
"kart1": 31.70266382613328,
|
| 106 |
+
"kart2": 28.93512581047037,
|
| 107 |
+
"kart3": 32.60427001609339
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"osc_20": {
|
| 111 |
+
"value": 14.289594750954103,
|
| 112 |
+
"worst_kart": null,
|
| 113 |
+
"per_kart": {
|
| 114 |
+
"kart1": 14.522423588795055,
|
| 115 |
+
"kart2": 12.065691020755775,
|
| 116 |
+
"kart3": 16.376250714405803
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"osc_30": {
|
| 120 |
+
"value": 6.583788649652612,
|
| 121 |
+
"worst_kart": null,
|
| 122 |
+
"per_kart": {
|
| 123 |
+
"kart1": 6.629495259895925,
|
| 124 |
+
"kart2": 4.88301052818591,
|
| 125 |
+
"kart3": 8.32498908330406
|
| 126 |
+
}
|
| 127 |
+
},
|
| 128 |
+
"laps_pct": {
|
| 129 |
+
"value": 54.92455418381344,
|
| 130 |
+
"worst_kart": null,
|
| 131 |
+
"per_kart": {
|
| 132 |
+
"kart1": 56.95473251028807,
|
| 133 |
+
"kart2": 57.36625514403292,
|
| 134 |
+
"kart3": 50.452674897119344
|
| 135 |
+
}
|
| 136 |
+
},
|
| 137 |
+
"failures": {
|
| 138 |
+
"value": 3596,
|
| 139 |
+
"worst_kart": null,
|
| 140 |
+
"per_kart": {
|
| 141 |
+
"kart1": 1213,
|
| 142 |
+
"kart2": 1216,
|
| 143 |
+
"kart3": 1167
|
| 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
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"job_id": "20261011-225548-large-ilqr-steer-learn-estfix",
|
| 4 |
+
"recipe": "large-ilqr-steer-learn-estfix",
|
| 5 |
+
"notes": "large v3: gradient MPC, learned steer map with the steady-state gate (estfix), smallgpu",
|
| 6 |
+
"user": "shay",
|
| 7 |
+
"ran_at": "2026-10-13T07:04:16.284+00:00",
|
| 8 |
+
"duration_s": 90507.866,
|
| 9 |
+
"cte_p50": 0.26512092744463145,
|
| 10 |
+
"cte_p90": 0.6748502332304815,
|
| 11 |
+
"cte_p99": 2.04869898335375,
|
| 12 |
+
"recovery_rate": 0.8742248913627264,
|
| 13 |
+
"recovery_s_median": 1.9335000000000004,
|
| 14 |
+
"safety": 0.7890387149501775,
|
| 15 |
+
"unsafe_lat": 0.0006253486982745151,
|
| 16 |
+
"unsafe_rate": 0.10050115213827407,
|
| 17 |
+
"unsafe_travel": 0.0,
|
| 18 |
+
"unsafe_spin": 3.259072659094423e-05,
|
| 19 |
+
"unsafe_off": 0.12417629554311432,
|
| 20 |
+
"osc_10": 31.06384130600107,
|
| 21 |
+
"osc_20": 14.289594750954103,
|
| 22 |
+
"osc_30": 6.583788649652612,
|
| 23 |
+
"laps_pct": 54.92455418381344,
|
| 24 |
+
"failures": 3596,
|
| 25 |
+
"n": 32076,
|
| 26 |
+
"errors": 0,
|
| 27 |
+
"worst": {
|
| 28 |
+
"cte_p50": 0.2680266975531274,
|
| 29 |
+
"cte_p90": 0.7092344637468333,
|
| 30 |
+
"cte_p99": 2.2087851212449867,
|
| 31 |
+
"recovery_rate": 0.8621267519804997,
|
| 32 |
+
"recovery_s_median": 2.167,
|
| 33 |
+
"safety": 0.7661554784881479,
|
| 34 |
+
"unsafe_lat": 0.0010117707755495067,
|
| 35 |
+
"unsafe_rate": 0.12392850642102259,
|
| 36 |
+
"unsafe_travel": 0.0,
|
| 37 |
+
"unsafe_spin": 4.7229254490340136e-05,
|
| 38 |
+
"unsafe_off": 0.12694248181295464,
|
| 39 |
+
"osc_10": 32.60427001609339,
|
| 40 |
+
"osc_20": 16.376250714405803,
|
| 41 |
+
"osc_30": 8.32498908330406,
|
| 42 |
+
"laps_pct": 50.452674897119344,
|
| 43 |
+
"failures": 1216,
|
| 44 |
+
"n": 32076,
|
| 45 |
+
"errors": 0
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
]
|