Skip to content

segmentation_test: the GenSeg port on the group's real maps, opt-in (CVC_VOLROVER_DATA) - #1303

Merged
transfix merged 1 commit into
masterfrom
p5/genseg-real-data-tests
Nov 16, 2026
Merged

transfix merged 1 commit into
masterfrom
p5/genseg-real-data-tests

Conversation

@transfix

Copy link
Copy Markdown
Owner

Adds two cases to segmentation_test that run the GenSeg port (P5) on the group's own cryo-EM maps. These are the maps the legacy library was written for. The cases run only when CVC_VOLROVER_DATA names the directory holding those maps; without it they are skipped, so CI skips them. The maps stay outside the repository, and the tests hold only fingerprints of the expected results.

The expected labels and border voxels come from the legacy library itself: genseg_legacy from tools/volrover-goldens, run on the same map, seeds and thresholds. Each run is pinned by FNV-1a 64 hashes of the label volume and of the border list.

RibosomeAsTheLegacyLibraryAndThePublishedSplit

  • Map: EMD-1056 (130³), one seed per subunit.
  • Thresholds: tlow 110, thigh 180, the ones the 30S/50S split was published with.
  • Checks that the result equals the legacy library's: per-class counts 54585 / 75792, 58032 border voxels, and 415 automatic seeds all classified by the threshold sweep.
  • Checks agreement with the published split: Dice 0.901 against 30S and 0.929 against 50S. The test's floors are 0.89 and 0.92.

VirusCapsidInto252CapsomersAsTheLegacyLibrary

  • Map: the EMD-1011 capsid layer (256³), cut into its 252 capsomers with one seed each. The seeds are picked from the capsomer index that the legacy virus pipeline wrote.
  • Checks that the result equals the legacy library's: 1981954 labelled voxels and 407841 border voxels.
  • Checks agreement with that index: at the default gamma −0.12, 18.6% of the index lands in its own capsomer; at −0.04 it is 48.0%, which is 73% of the voxels the run labels.
  • The default does poorly because a seed on a density peak is walled in by steep flanks while fronts on flat ground take its region. The test asserts the −0.04 floors.

Verified on Windows (MSVC Release): with the data, both pass in 16 s; without it, both skip and the other 18 tests pass. The wasm build of this file is checked only by CI's ports lane, where these two skip.

No CI job is added or renamed, and ci.yml is unchanged.

…CVC_VOLROVER_DATA)

With CVC_VOLROVER_DATA set to the directory of the group's cryo-EM maps, two cases run; without
it they are skipped, so CI skips them.

- The ribosome EMD-1056 (130^3), one seed per subunit, tlow 110 / thigh 180 (the thresholds the
  30S/50S split was published with): labels and border voxels as the legacy library's (FNV-1a
  fingerprints from tools/volrover-goldens' genseg_legacy on the same input, 415 automatic seeds
  classified by the sweep), and Dice 0.901 / 0.929 against the published 30S and 50S.
- The EMD-1011 capsid layer (256^3) cut into its 252 capsomers, one seed each, taken from the
  capsomer index the legacy virus pipeline wrote: labels and border as the legacy library's, and
  the share of the index in its own capsomer, 18.6% at the default gamma -0.12 against 48.0% at
  -0.04 (fronts from seeds on density peaks get trapped behind steep flanks).

The maps stay outside the repository; only their fingerprints are here.
@transfix
transfix enabled auto-merge (squash) November 16, 2026 07:00
@transfix
transfix merged commit 9a9e9c1 into master Nov 16, 2026
29 checks passed
@transfix
transfix deleted the p5/genseg-real-data-tests branch November 16, 2026 19:51
transfix added a commit that referenced this pull request Nov 16, 2026
…#1305, #1310, #1311)

#1305 gives each Runtime program-lane providers of its own (add_program_intrinsics), so two
documents on one app no longer reach each other's verbs and host functions, and moves
AppRuntime's provider there from the app's list. This branch had split that provider in seven,
each registered on the app with its kind (S1-Q7). Conflicts in ariadne.h, app_runtime.cpp and
ariadne.cpp keep both:

- Runtime::add_program_intrinsics takes a kind too (the form without one is host_only, as
  register_action_intrinsics's), and the Runtime's own list keeps it. AppRuntime adds its seven
  providers there, each with the kind it had, in the same order.
- install_providers runs any list by kind; the Runtime's own run after the app's, by the same
  rules, wherever an env is built: an action, a resident, a spawned child (finish_context), the
  names probe, and init: and a module's init: (every kind as it is, on their own thread).
- host_only_bindings counts the Runtime's own host_only providers, so one that binds anything
  pumps the document's group on the host thread, as an app provider does.
- add_program_intrinsics marks the placement stale, as a late host verb does.
- The own list is read where an env is built, a spawned child's on its pumping worker, so it is
  under a mutex of its own (own_mutex), copied, and run unlocked; names_mutex no longer guards it.

STATE_EXEC_THREADED.md: the Runtime's own providers, AppRuntime's seven among them, and the
fourth late-registration path. Built locally (MSVC Release; AB.lock held the box, so the suites
were not run here); a test of the own providers by kind follows.
transfix added a commit that referenced this pull request Nov 20, 2026
P6 moved segment_seeded's input read into genseg::read_voxels (critical_points.cpp), which
segment_seeded, critical_point_seeds and capsid_critical_points share. The threaded read moves
there with it: read_voxels hands the context the app's compute pool once the volume holds two
pieces, and reads in pieces (the first non-finite voxel still the first in order, the same
messages). genseg.cpp keeps both includes; segmentation_test keeps GroELAsTheLegacyLibrary next
to #1303's real-map tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant