|
|
| _kill (popen) |
| |
|
| _handle_signal (signum, _frame) |
| |
|
| _mem_wrapper (model_id) |
| |
| | _memory_capped_available () |
| |
|
| already_done (model_id) |
| |
| | run_one (mesh_path) |
| |
| | _describe_exit (code, work) |
| |
|
| _prune (work) |
| |
|
| _read_status (d) |
| |
| | _parse_success (d) |
| |
| | _histogram (title, values, edges, fmt="{:g}") |
| |
|
| _esc (s) |
| |
|
| _fmt (v, nd=2) |
| |
|
| _bucket (values, edges) |
| |
|
| _bars (labels, counts, unit, alt=False) |
| |
|
| _html_hist (values, edges, unit) |
| |
|
| _stat (k, v, u="", cls="") |
| |
|
| _table (headers, rows, reason_col=None, empty="(none)") |
| |
| | generate_html_report (rows, stats, report_dir, out_dir, dataset_dir=None, mesh_extensions=()) |
| |
|
| generate_report () |
| |
|
| _reason_bucket (reason) |
| |
| | _order_models (meshes) |
| |
|
| run_sweep () |
| |
| | stop_sweep () |
| |
|
|
| SWEEP_ROOT = Path("/u/3/daniele/thingi10k-sweep") |
| |
|
str | WMTK_APP = SWEEP_ROOT / "build/app/wmtk_app" |
| |
|
str | DATASET_DIR = SWEEP_ROOT / "data" |
| |
|
| OUT_DIR = Path(os.environ.get("TETWILD_OUT", str(SWEEP_ROOT / "runs/full"))) |
| |
|
tuple | MESH_EXTENSIONS = ("*.stl", "*.obj", "*.ply", "*.off") |
| |
|
| PARALLEL = max(1, int(os.environ.get("TETWILD_PARALLEL", "8"))) |
| |
|
| THREADS = max(1, int(os.environ.get("TETWILD_THREADS", "8"))) |
| |
|
| JOB_TIMEOUT = int(os.environ.get("TETWILD_JOB_TIMEOUT", "10800")) |
| |
|
| MEM_GB = int(os.environ.get("TETWILD_MEM_GB", "128")) |
| |
|
| LIMIT = int(os.environ.get("TETWILD_LIMIT", "0")) |
| |
|
| SAMPLE = os.environ.get("TETWILD_SAMPLE", "smallest") |
| |
|
| SEED = int(os.environ.get("TETWILD_SEED", "0")) |
| |
|
| REPORT_ONLY = bool(os.environ.get("TETWILD_REPORT_ONLY")) |
| |
| dict | PARAMS |
| |
|
list | KEEP_GLOBS = ["*.msh", "*.obj", "*.log", "*.json", "status.txt"] |
| |
|
str | SUCCESS_DIR = OUT_DIR / "success" |
| |
|
str | FAILURE_DIR = OUT_DIR / "failure" |
| |
|
str | WORK_DIR = OUT_DIR / ".work" |
| |
|
str | REPORT_DIR = OUT_DIR / "report" |
| |
|
str | PIDFILE = OUT_DIR / "sweep.pid" |
| |
|
| _STOP = threading.Event() |
| |
|
dict | _children = {} |
| |
|
| _children_lock = threading.Lock() |
| |
|
| IT_RE = re.compile(r"========it (\d+)========") |
| |
| | PHASES_RE |
| |
|
str | _CSS |
| |
| str | _JS |
| |
Batch-run tetwild over the Thingi10K dataset -- kirby.cs.nyu.edu edition.
Adapted from run_tetwild_thingi10k.py (the macOS version). Same contract: run it
with no arguments to start (or resume) the sweep; it skips every model already in
success/ or failure/. Stop it cleanly with:
run_tetwild_thingi10k_kirby.py stop
which signals the running sweep to abandon whatever is in flight (those models are
left unpublished, so a later resume reprocesses them -- no spurious failures), drain,
write the report, and exit.
What changed from the macOS version:
* paths point at /u/3/daniele/thingi10k-sweep;
* OUT_DIR is env-overridable (TETWILD_OUT), so a trial sweep and the real one do
not share a success/failure namespace;
* defaults are 8 models x 8 threads, 3h per model;
* each model runs inside a systemd transient scope with a hard memory cap, so a
runaway model is OOM-killed instead of taking the machine down with it (kirby is
shared); see the memory note below;
* TETWILD_SAMPLE picks *which* models a truncated run gets -- 'smallest' is the
original behaviour, 'spread' covers the whole size range, which is what you want
from a 100-model trial;
* the report tells OOM kills apart from other signals.
Per model:
* write a tetwild JSON (eps_rel 1e-3, filter none);
* run wmtk_app in a scratch dir under the output volume, capped in time and memory;
* exit 0 -> move the run into <OUT>/success/<id>/
nonzero / timeout / OOM -> move the run into <OUT>/failure/<id>/ (with a reason)
Configuration -- environment variables:
TETWILD_OUT output directory (default runs/full)
TETWILD_PARALLEL models to run concurrently (default 8)
TETWILD_THREADS threads per model (default 8)
TETWILD_JOB_TIMEOUT per-model seconds (default 10800 = 3h)
TETWILD_MEM_GB per-model memory cap, GB (default 128, 0 disables)
TETWILD_LIMIT process at most N new models (default 0 = all)
TETWILD_SAMPLE name | smallest | spread | random (default smallest)
TETWILD_SEED seed for TETWILD_SAMPLE=random (default 0)
TETWILD_REPORT_ONLY if set, only regenerate the report and exit
Memory note: the cap is PER MODEL, not a budget for the sweep. 8 x 128G is more than
kirby has, so the cap is a runaway-killer, not an admission control -- it stops one
pathological mesh from swapping the box, and does nothing in the normal case. Lower
TETWILD_MEM_GB if the sweep has to coexist with someone else's job.