Skip to content

feat: EXPKITS-1531 identify embedding spaces and define selection - #267

Merged
zmolnar merged 1 commit into
feature/EXPKITS-1530-mask-semanticsfrom
feature/EXPKITS-1531-embedding-spaces
Nov 16, 2026
Merged

zmolnar merged 1 commit into
feature/EXPKITS-1530-mask-semanticsfrom
feature/EXPKITS-1531-embedding-spaces

Conversation

@zmolnar

@zmolnar zmolnar commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Goal

EXPKITS-1531: Identify embedding spaces and select comparable outputs explicitly.

Change

Before

Arrival order could overwrite embeddings. Equal-length vectors from unrelated spaces could match; unavailable comparisons became numeric zero, and float accumulation or NaN handling could produce false results.

After

  • Declare space ID, dimension, cosine metric and explicit subject. Comparison requires compatible spaces and finite, nonzero vectors.
  • Select by space and optional producer; count duplicates before validation so ordering cannot choose a winner.
  • Retain typed space information in active/dormant tracking history. Incompatible data produces no similarity; valid cosine costs and thresholds remain.
  • Validate parser inputs and normalize with double accumulation. Update SDKs, inspection and Plumber together.
  • Replace embedding-content-type with explicit selectors. The optional parser declaration advances the OpChain v1 reader from 1.13.0 to 1.14.0 in this layer. The later refactor: EXPKITS-1569 connect inputs to concrete producers #276 migrates Model and OpChain descriptors to format 2.0.0; no legacy embedding-selector alias is introduced here.

Testing

Coverage and historical validation

Controlled-vector regressions cover distinct spaces, multiple producers, duplicates, invalid/extreme values, subject swaps and active/dormant history. Model-specific ReID accuracy and physical GPU execution are unverified. Persistent track-subject comparison is completed in #269.

Post-rebase evidence

The 2026-11-16 assembled-stack build, native/WebUI/Plumber tests, SDK/bundle checks
and documentation validation are recorded in the Testing section of #276
at aad8a7f218a2. These results supplement the earlier coverage above; they are not
standalone local reruns at every lower PR head.

Reproduction commands

From the repository root inside the supported OPK development container, with
the pinned submodules initialized and the normal model/media setup available:

NINJAFLAGS=-j2 ./scripts/build.sh debug true
meson test -C development/build-active --print-errorlogs --num-processes 2
./scripts/perception-sdk.sh check
./scripts/opksink-web.sh test
./scripts/opksink-web.sh check
PYTHONPATH=tools/plumber:generated/open_perception_kit/python/src python3 -m unittest discover -s tools/plumber/tests

From the host checkout, run ./scripts/gen-doc.sh to generate and validate the
documentation and diagrams in build output.

Links

Part of the breaking, unreleased SDK/product 1.0.0 refactor. Producers and consumers
must use compatible regenerated snapshots. Stable release packaging/publication is separate.

@zmolnar
zmolnar requested review from a team as code owners November 9, 2026 12:58
@zmolnar
zmolnar added this pull request to stack #248 November 9, 2026 12:58
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from 5031196 to 692428f Compare November 11, 2026 10:31
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from 692428f to aeca55c Compare November 11, 2026 11:08
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from aeca55c to eb224e2 Compare November 11, 2026 12:40
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from eb224e2 to c6551db Compare November 11, 2026 13:43
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from c6551db to 42e1ab1 Compare November 11, 2026 15:56
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from 42e1ab1 to 7046dd6 Compare November 12, 2026 07:08
Comment thread development/common/opk/Embedding.h Resolved
@zmolnar
zmolnar force-pushed the feature/EXPKITS-1531-embedding-spaces branch from 7046dd6 to f0cbfe4 Compare November 13, 2026 11:29
Szendvics
Szendvics previously approved these changes Nov 16, 2026
Task: EXPKITS-1531

Declare comparison space, dimension, metric and subject in embedding metadata.
Replace arrival-order selection with explicit space/producer filters and
ambiguity handling. Preserve typed active and dormant history, validate
vectors and use robust cosine arithmetic across consumers.
Add the optional OpChain v1.8 space declaration, regenerate SDKs and bridge,
and cover parser, tracker, browser and Plumber regressions.

Signed-off-by: Zoltan Molnar <zoltan.molnar@arm.com>

@Szendvics Szendvics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as is.

@zmolnar
zmolnar enabled stacked auto-merge (squash) November 16, 2026 14:03
@zmolnar
zmolnar merged commit 31cf9cd into main Nov 16, 2026
19 checks passed
@zmolnar
zmolnar deleted the feature/EXPKITS-1531-embedding-spaces branch November 16, 2026 14:30
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.

2 participants