Repository navigation
D-TRACT-HARVEST-0: the ONNX graph as a DR#3 graph through the DT64 ON×WHEN×DO registry (lab probe) - #1850
Conversation
…e methods New lab crate crates/tract-harvest-probe (own workspace, excluded from the lance-graph workspace; no native crate depends on it). Tract parses and types an ONNX graph; admission matches a fixed pattern on the typed graph, takes domain/opset/initializer identity from the raw protobuf, and prepares a concrete recipe that calls only lance-graph-onnx and ndarray. ORT, with its graph optimizer off, is the independent oracle. Fixture A (tiny, committed): bit-exact with ORT; negatives for shape, unsupported op, foreign domain, invalid rewrite, stale weight generation and int32 overflow. Fixture B: layer 0's input RMSNorm of the Jina v5 small retrieval export, fetched by SHA-pinned byte ranges (CC-BY-NC weights are never committed); native output bit-exact except the one row whose mean differs by 1 ulp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
… dtype control Tract types an impossible broadcast symbolically and fails only at run time; the shape test now asserts that and the native Broadcast refusal. A Cast widened to f64 keeps the op pattern intact, so only the dtype check can refuse it; the half-precision control could not show that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
…, ledger, next PRs) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…stry Replaces the fixed admission recipes. Every ONNX node is an Identity position, every value a Property position; ON/DO are 64x64 relations and the schedule is read from dep = do_ ∘ read_by. Each node binds by op signature (domain, op_type, dtype, attributes) to one immutable lab classid whose WHEN is a K3 guard over Tract's facts and whose DO is an existing lance-graph-onnx / ndarray function. Plans are sealed in a FrameStore frame (source digest, registry version, coordinates). Tiny fixture bit-exact vs ORT literal incl. the 256-input div3 sweep; Where(c, X, 1) now runs (17). Jina layer-0 RMSNorm through the graph: 9259/10240 exact, max 4 ulp, the mean the only Bounded method. Full model coverage: 3751 WHEN-true, 169 WHEN-not-true, 3700 unregistered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
…uses Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
…s source-known) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
…4 registry Plan §0 (design, results, refusals, disable table, cost, OPEN), board entry, STATUS_BOARD row, INTEGRATION_PLANS status; entries index and supersession index regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
# Conflicts: # .claude/board/entries/README.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5da7678ce8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…onent must not grow the base Codex P2 (#1850): run() bound caller inputs without checking the facts the WHEN guards held on, so X as [2,3] reached the rank-1 ReduceSum DO and was summed flat. Inputs are now refused unless they are graph inputs with the resolved dtype, rank and known dims. Codex P2: guard_pow2 checked only the exponent's values; do_pow2 ignores the exponent, so a broadcasting exponent ([1] ^ [2]) gave the wrong output shape. WHEN now also requires broadcasting e against x to leave x's shape unchanged (FALSE, or UNKNOWN for a symbolic base dim). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v
Summary
Lab probe
crates/tract-harvest-probe(its own workspace, excluded; no native crate depends on it). It reads an ONNX graph as a graph and resolves each node through the DT64 ON × WHEN × DO schema. Tract is used only as a cold typing frontend.onanddo_areRowsrelations, anddep = do_ ∘ read_byis computed withdr_math_binding_probe::relcomp::compose. Ordered arguments are kept beside the relations, because ONNX operands are positional.0x0F01..0x0F51).lance-graph-onnx/ndarrayfunction; no new kernels.dep, and is sealed in aFrameStoreframe (source digest, registry version, coordinates).runchecks the frame and then routes each node to its DO.This replaces the fixed admission recipes from the first version of this PR (
admit.rsremoved), following the correction "We want the graph … resolve to polyfill and predicate methods in DT64 'on when do'". Plan §0 has the full design.Results (against ORT with
ORT_DISABLE_ALL, the literal semantics)div3sweep.Where(c, X, 1)now runs and returns 17: there is no rewrite to refuse, becauseWhereandReduceSumare separate methods.ReduceMeanis the only Bounded method. Every row whose mean is bit-exact is bit-exact on all of its outputs.When { False }Erfandcom.example:Abs→Unregistered(the domain is part of the signature)Powexponent other than 2 →When { False }UnregisteredWhen { Unknown }Frame(SourceChanged / MapChanged)Open
Test plan
cargo fmt,cargo clippy --release --all-targets -D warningscargo test --release --no-fail-fast -- --include-ignored: 20 passed (Jina tests needpython3 tools/fetch_jina_slice.py; CC-BY-NC weights are never committed)examples/stages(full-model coverage) andexamples/cost🤖 Generated with Claude Code
https://claude.ai/code/session_01XAqKMMjKnig6MXTd41Lf2v