Commit 103bdec
committed
ROI tree: walk innervates + drop depth cap; fix painted_index label fallback
v1.13.2's get_template_roi_tree walked the painted-leaf paths through
[:SUBCLASSOF|part_of*0..20] only. On the adult VNS template, 16 of the
22 painted Individuals are nerves (FBbt_00004019 / _00004055-63 /
_00004094-99 / _00004105-08 / _00007657) whose part_of chain goes to
adult peripheral nervous system, NOT to the central VNC root. They
connect to the VNC neuromeres via the `innervates` relation instead.
The legacy v2 Cypher had the same edge set and the same gap; with v2's
visual tree typically loading JFRC2 by default it was easy to miss.
Changes:
- Cypher walk: extend to [:SUBCLASSOF|part_of|innervates*0..]. Adult VNS
Court2018 now renders 26 nodes (was 8) with all 22 painted classes
surfaced; JRC2018UnisexVNC gains its nerves; Hemibrain + Ito2014 gain
their antennal / labellar / abdominal nerves. Templates that have no
painted nerves (JFRC2, JRC2018Unisex, T1 Leg, larval CNS, Adult Head)
are unchanged.
- Depth cap *0..20 dropped to *0.. on Robbie's call: the cache absorbs
the cold-cache delay (all ten test templates still complete cold in
<2.4s on pdb), and the cap risked silently truncating future deep
ontology paths.
- painted_domain_index class_label fallback: when a painted class
isn't reached by the tree walk (e.g. orphaned by relations we don't
traverse), use the class_label captured in painted_rows. v1.13.2 left
these as null and any tooltip/debug surface keying off the reverse
lookup would have rendered "None".
Cache bucket renamed template_roi_tree -> template_roi_tree_v2 so the
v1.13.2 cache entries (built with the narrower rel-set) don't shadow
the new walk. Surgical invalidation - no minor bump needed, other
queries' caches are untouched.
Verified against pdb for all 10 production templates:
template nodes edges painted rel mix
JRC2018Unisex 77 92 46 part_of=89, SUBCLASSOF=3
JFRC2 brain 70 85 58 part_of=82, SUBCLASSOF=3
JRC_FlyEM_Hemibrain 97 122 97 part_of=97, SUBCLASSOF=16, innervates=9
Ito2014 brain 110 168 75 part_of=118, SUBCLASSOF=10, innervates=40
JRC2018UnisexVNC 30 46 21 part_of=21, SUBCLASSOF=16, innervates=9
adult VNS Court2018 26 28 22 innervates=14, SUBCLASSOF=10, part_of=4
L1 larval CNS 0 0 0 (no painted data)
L3 CNS Wood2018 140 328 255 part_of=199, SUBCLASSOF=129
Adult T1 Leg 3 2 4 part_of=2
Adult Head McKellar 30 46 18 SUBCLASSOF=29, part_of=17
All cold-cache runs sub-2.4s. No __version__ bump.1 parent f025894 commit 103bdec
2 files changed
Lines changed: 35 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4883 | 4883 | | |
4884 | 4884 | | |
4885 | 4885 | | |
4886 | | - | |
| 4886 | + | |
4887 | 4887 | | |
4888 | 4888 | | |
4889 | 4889 | | |
4890 | 4890 | | |
4891 | 4891 | | |
4892 | 4892 | | |
4893 | | - | |
4894 | | - | |
4895 | | - | |
4896 | | - | |
4897 | | - | |
| 4893 | + | |
| 4894 | + | |
| 4895 | + | |
| 4896 | + | |
| 4897 | + | |
| 4898 | + | |
| 4899 | + | |
| 4900 | + | |
| 4901 | + | |
| 4902 | + | |
| 4903 | + | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
4898 | 4907 | | |
4899 | 4908 | | |
4900 | 4909 | | |
| |||
4950 | 4959 | | |
4951 | 4960 | | |
4952 | 4961 | | |
4953 | | - | |
| 4962 | + | |
4954 | 4963 | | |
4955 | 4964 | | |
4956 | 4965 | | |
| |||
5054 | 5063 | | |
5055 | 5064 | | |
5056 | 5065 | | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
5057 | 5083 | | |
5058 | 5084 | | |
5059 | 5085 | | |
5060 | | - | |
| 5086 | + | |
5061 | 5087 | | |
5062 | 5088 | | |
5063 | 5089 | | |
| |||
0 commit comments