|
Wildmeshing Toolkit
|
Batch-run triwild over a large 2D curve dataset. See README.md.
Written for the 20k 2D dataset on kirby.cs.nyu.edu, whose layout is the default for
TRIWILD_ROOT; set that variable to run it anywhere. The 2D counterpart of the
Thingi10K tetwild runner, and deliberately the 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_triwild_sweep.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 differs from the 3D runner:
* paths hang off TRIWILD_ROOT;
* the dataset is .obj only -- triwild reads segment networks ("v" + "l" lines), not
triangle soups, so the other extensions are not applicable;
* write_vtu is forced OFF. It defaults to true now (parity with tetwild), but the
sweep prunes .vtu anyway, and 20k of them would be written only to be deleted.
The .msh is the actual output;
* skip_winding_number is forced ON. With filter="none" the winding number only feeds
the MSH group tags, which this sweep does not read, and it is brute-force O(#queries
x #segments) in 2D -- it accounted for 95% of the timeouts in the previous run;
* DEBUG_hausdorff is forced ON, and the report separates its two directions:
CONTAINMENT d(output->input), the envelope invariant, which is the only one bounded
by eps, and COVERAGE d(input->output), which nothing promises and which is reported
without a threshold. Runs made before that direction was corrected stored coverage
under the name "hausdorff" and carry no "coverage" key; the report detects them by
that absence, labels them metric=legacy-coverage, and keeps them out of the
containment statistics rather than pooling two different quantities;
* the report buckets the two triwild-specific failures -- the arrangement orientation
error and the envelope sanity-check error -- instead of lumping them into
"nonzero exit";
* env vars are TRIWILD_*, not TETWILD_*, so a 2D and a 3D sweep can run side by side
on the same machine without one's settings leaking into the other.
Per model:
* write a triwild JSON (defaults from whatever branch build/ was built from);
* 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:
TRIWILD_ROOT sweep root: build/, data/, runs/ (default the kirby path)
TRIWILD_OUT output directory (default <root>/runs/full)
TRIWILD_PARALLEL models to run concurrently (default 16)
TRIWILD_THREADS threads per model (default 8)
TRIWILD_JOB_TIMEOUT per-model seconds (default 3600 = 1h)
TRIWILD_MEM_GB per-model memory cap, GB (default 128, 0 disables)
TRIWILD_LIMIT process at most N new models (default 0 = all)
TRIWILD_SAMPLE name | smallest | spread | random (default name)
TRIWILD_SEED seed for TRIWILD_SAMPLE=random (default 0)
TRIWILD_REPORT_ONLY if set, only regenerate the report and exit
Memory note: the cap is PER MODEL, not a budget for the sweep. 16 x 128G is far more
than kirby has, so the cap is a runaway-killer, not admission control -- it stops one
pathological input from swapping the box, and does nothing in the normal case. It
matters more here than in 3D: the dataset's file sizes span 2.7 KB to 1.6 GB, and the
largest inputs are read whole before anything else happens.