inspector: cKDTree-based KNN for fast neighbor lookup on click#486
Draft
ElmoPA wants to merge 4 commits into
Draft
inspector: cKDTree-based KNN for fast neighbor lookup on click#486ElmoPA wants to merge 4 commits into
ElmoPA wants to merge 4 commits into
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
aidang3019
changed the base branch from
elmo/latent-dataset-stride-filters
to
graphite-base/486
June 11, 2026 20:50
aidang3019
force-pushed
the
elmo/inspector-knn-tree
branch
from
June 11, 2026 20:50
2c8a0d7 to
5c56d8f
Compare
aidang3019
force-pushed
the
graphite-base/486
branch
from
June 11, 2026 20:50
e4b19e9 to
2c53ef8
Compare
This was referenced Jun 11, 2026
aidang3019
force-pushed
the
elmo/inspector-knn-tree
branch
2 times, most recently
from
June 13, 2026 20:35
ef48d0d to
f0bd0eb
Compare
This was referenced Jun 16, 2026
aidang3019
force-pushed
the
elmo/inspector-knn-tree
branch
from
July 7, 2026 02:57
f0bd0eb to
807d103
Compare
aidang3019
force-pushed
the
graphite-base/486
branch
from
July 7, 2026 02:57
2c53ef8 to
43c897b
Compare
aidang3019
force-pushed
the
elmo/inspector-knn-tree
branch
from
July 7, 2026 03:36
807d103 to
2a01b14
Compare
…ector Audit follow-up on the latent-KNN stack: frames not covered by any annotation span were never filtered from the KNN — they only collapsed into a whole-recording fallback action in the dedupe, so unannotated frames still surfaced as neighbors (and competed in pair ranking). Extraction side (the clean path — banks become annotation-clean at the source): - AnnotatedFramesDataset: MultiDataset wrapper keeping only frames inside >=1 annotation span, unioned across every `annotations*` array (legacy flat + role-keyed annotations_task/annotations_subtask). Composable under EvenStrideDataset (re-exports _global_indices_by_dataset). - latent_dataset: annotated_frames_only wiring in build_dataset + ported build_even_stride factory; cotrain_pi_latent.yaml defaults it to true. - eval_latent: port the layer_subset / front_tokens_only / capture_lang capture options the fulldata run used (from the uncommitted 6dstack checkout) on top of the source-frame_idx machinery. - sortpp_latent_stride15 + cotrain_sort_pp_lang_6d data configs and the precompute_knn.py sidecar producer committed (previously uncommitted in the 6dstack checkout); stride15 extraction now annotated_frames_only. - _has_annotation: role-keyed fallback when the flat `annotations` array is absent. Inspector side (defense in depth for banks that still carry unannotated rows): - annotation_intervals unions all `annotations*` arrays (role-keyed ready). - _row_action_ids: rows outside every span get id -1; _dedupe_neighbors_by_action drops them, so they never appear in the scatter KNN, the browser precomputed fast path, or the computed scan; same-embodiment mode masks them explicitly; pair_rank excludes them from queries and candidates. - Legacy banks whose frame_idx is the per-run sample counter (e.g. the fulldata_2026-07-07 artifacts) are detected (_frames_look_like_source_indices) and keep the old fallback behavior with a loud warning — counter rows cannot be mapped to spans, so those banks need re-extraction to be filterable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ions Every episode in that folder carries an empty `annotations` array, so the July-7 fulldata bank's aria half has zero annotation coverage. With annotated_frames_only this config now fails loudly there; point human_bimanual at sortpp_aria_new or sortpp_aria_rolekeys instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ZarrDataset surfaces the true source frame index and PILatentEvalVideo consumes it, but process_batch_for_training rebuilt the batch keeping only norm-stat keys + episode_hash — frame_idx never reached the latent writer, which silently fell back to the per-run sample counter (caught by the annfilter smoke: every CSV frame_idx was <= n_samples). Forward frame_idx alongside episode_hash so bank rows can be mapped to annotation spans. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aidang3019
force-pushed
the
elmo/inspector-knn-tree
branch
from
July 21, 2026 03:09
2a01b14 to
8b878cc
Compare
aidang3019
force-pushed
the
graphite-base/486
branch
from
July 21, 2026 03:09
a23bee1 to
282c2f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.