cond_cat / cond_cont column layout is a fragile three-file handshake #37

Open
opened 2026-08-13 15:07:04 +02:00 by lars · 0 comments
Owner

The cond_cat / cond_cont column layout is defined in
giant/data/transforms.py twice (build_cond_features ~line 811,
build_features ~line 980) and consumed in giant/model/encoders.py:12-31
(cat_col_layout), held together by parallel comments that say "the two sides
must never drift apart". Add a third conditioning axis — a detector-region
embedding, a per-track generation/depth scalar, a process prior — and it's a
coordinated three-file edit where getting the order wrong produces silently
mis-indexed columns
, not an exception.

Proposal: a CondLayout object built once from the conditioning config,
returning named slices (layout.particle_phys, layout.material_topn_col, …)
consumed by both the feature builders and ConditionEncoder; then a
CONDITIONING_AXIS_REGISTRY so a new axis registers (feature_columns, encoder_module) as a pair rather than being threaded by hand.

This is what makes "very customizable conditioning" real rather than "three
customizable modes of two fixed axes".


Migrated from issues.md (v0.3.0 branch review, 2026-08-13), Issue 12.

The `cond_cat` / `cond_cont` column layout is defined in `giant/data/transforms.py` twice (`build_cond_features` ~line 811, `build_features` ~line 980) and consumed in `giant/model/encoders.py:12-31` (`cat_col_layout`), held together by parallel comments that say "the two sides must never drift apart". Add a third conditioning axis — a detector-region embedding, a per-track generation/depth scalar, a process prior — and it's a coordinated three-file edit where getting the order wrong produces *silently mis-indexed columns*, not an exception. **Proposal:** a `CondLayout` object built once from the conditioning config, returning named slices (`layout.particle_phys`, `layout.material_topn_col`, …) consumed by both the feature builders and `ConditionEncoder`; then a `CONDITIONING_AXIS_REGISTRY` so a new axis registers `(feature_columns, encoder_module)` as a pair rather than being threaded by hand. This is what makes "very customizable conditioning" real rather than "three customizable modes of two fixed axes". --- Migrated from `issues.md` (v0.3.0 branch review, 2026-08-13), Issue 12.
lars added the modularity label 2026-08-13 15:07:04 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lars/giant#37