You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Serve Parquet anchors through a prepared DiskGraph index - #519
Online serving now accepts the artifact, an open DiskGraph plan, and a Parquet anchor table. It uses the saved encoders and the same native batching path as offline inference. Multiple servers sharing one plan serialize requests while its sampler is bound.
Breaking change. Callers that pass fetched rows and Python requests receive an explicit refusal. The caller owns the index and controls when its source data is refreshed. The row-fetch specification remains available for inspection.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "tone_instructions" at "reviews"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Walkthrough
Serving now uses a prepared DiskGraph plan and Parquet anchors to assemble native model-format inference batches. The assembler validates the artifact and plan, rejects row-only inputs, and does not use Python request-batching fallback. Tests and examples compare served batches with offline inference on the same index and anchors.
Serving now takes Parquet anchors against a prepared DiskGraph plan, and legacy row inputs are refused on purpose. The only open concern is a test helper that could silently overwrite anchor columns if a request's metadata used a reserved key. No current test triggers it, so merge risk is low.
Security architecture risk: Moderate · up to 02bec
Serving now reads from a shared dataset rather than receiving only the rows selected for each request. This makes it important for callers to authorize which records can be scored and to control which input files are accepted. Serving calls are serialized with each other, but other uses of the same open dataset are not covered by that protection.
Retained concerns
Medium · security · inferred: The old assembler could not read rows omitted by the caller. The new assembler resolves anchor entities and prediction times against the prepared index. If an integration forwards request-selected anchors without authorization equivalent to its former row selection, scoring can reach data that the integration previously withheld. The contract fingerprint checks compatibility, not tenant or entity entitlement. This concern is bounded by the configured index and its sampling contract; no production exposure is established.
Medium · security · inferred: The new serving path reaches the offline materializer's automatic recognition of precomputed values in Parquet metadata. The metadata supplies both the feature-column mapping and the declared contract and dataset fingerprints. Matching those declarations and the anchor binding establishes compatibility, not who produced the values. If an integration accepts untrusted Parquet files and those checks pass, supplied scalars can enter model inputs without being recomputed from the prepared index. This path was not reachable through the former row-based serving API.
Medium · reliability · inferred: Serving requests now replace the prepared plan's active sampler for the duration of a task. The lock excludes other serving requests on the same plan, not direct materialization. A concurrent native task can replace the shared binding, and closing the currently bound task clears it rather than restoring another live task's binding. Source operations that consult the shared sampler can therefore use a different context from the one their task established. The old serving path used a request-local row source. Impact is confined to mixed use of the same plan; callers are already told to wait for serving calls before closing it.
Security review details
Security Blast Radius
inferred — At the library boundary, the selected plan bounds indexed data access and the serving process's filesystem permissions bound anchor reads. Local-only path resolution rejects URI schemes but does not constrain directory and glob resolution to a caller-specific root.
Trust Boundaries and Controls
observed — Serving requires complete, compatible fitted state and a matching DiskGraph contract. It disables Python request fallback on the newly allocated task; the fallback remains enabled by default for non-serving consumers, as before.
Resilience and Maintainability Implications
observed — Once a task is acquired, serving consumes the batch iterator and closes the task before releasing the plan lock, including when batch production raises. The returned list does not leave an active batch iterator with the caller.
Hardening Proposals
proposed — Have the trusted integration authorize anchor entities and write anchor files under a service-owned root. Reject precomputed value metadata on that input path unless the file comes from a separately trusted producer.
Pre-merge checks: 2 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Change Map Design Review
(previously flagged, unaddressed)
Details from the previous assessment are unavailable.
Passed checks: 2 passed
Check name
Status
Explanation
Pr Size
The PR size check fails only when the changed-file count exceeds 40. git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists 28 changed files, all with…
Public Resource Access
The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. I diffed the reviewed range (refs/coderabbit/pre-merge-chec…
Full details: Pr Size
Explanation
The PR size check fails only when the changed-file count exceeds 40. git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists 28 changed files, all with status M (modified). There are no renames or additions to add to that count. Because 28 does not exceed 40, the check passes. Line counts were ignored, as the check requires.
Full details: Public Resource Access
Explanation
The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. I diffed the reviewed range (refs/coderabbit/pre-merge-check/base to head; 31 modified files, 2,162 diff lines) and searched every added line for http(s) URLs, www. hosts, GitHub/GitLab/PyPI references, pip or git+ install sources, wheel or tarball links, S3 or artifactory locations, and index URLs. No added line matched. The removed-line search also found no URL references. The PR description's links (PR #519 comment, issue #501, CI run links) are not in the diff, so they are outside this check's scope. Because the PR adds or changes no external resource reference, the check passes.
Latest assessment: Change Map Design Review
Latest assessment: The latest assessment was inconclusive; the previous failure remains unresolved.
Latest explanation: The check assesses the PR conversation comment that starts with <!-- kumo-pr-change-map -->. I could not read that comment. The sandbox holds only the git checkout and the refs/coderabbit/pre-merge-check/{base,head} refs. The marker string appears only in docs/development/review.md, which describes the expected comment. The PR description links to the comment at issuecomment-7118350670, but no file in the checkout contains its body. The checkout also holds no comment export. The commit range is available. It changes 28 files under packages/experimental/kumo-pytorch. The commit message is Use prepared DiskGraph indexes and Parquet anchors for serving. The primary PR is NVIDIA/kumo-engine #519, with base serving-without-in-memory, head codex/501-native-serving, and author nittin-murthi. The PR objectives summarize the comment at a high level. They do not give the Change map table, the per-change rationale, the stopping condition, or the verification mapping. I cannot assess each change against the failure, the necessity, the abstraction layer, the behavior preservation, or the omitted behavior. Agreement with the summary would not prove the table's correctness. The standing previous FAIL has no details. I cannot confirm or refute it without the comment body.
Latest resolution: Provide the body of the PR conversation comment that starts with <!-- kumo-pr-change-map --> (comment ID 7118350670, linked from the PR description), or enable retrieval of PR comments for this check. Then re-run the check. Also supply the details of the previous FAIL, so that its claims can be checked against the comment and the code.
Finishing Touches
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
On #379, the #501 requests reached the Python request batcher. This change routes serving through the existing native Parquet path. The regression checks the emitted batches and prevents reopening the index or entering the Python batcher.
The reason will be displayed to describe this comment to others. Learn more.
Serving no longer rejects an anchor whose time is before the entity's available_from. The old path raised "entity did not exist before the requested sample time" (rows/samples.py).
The native model path (_typed_batches -> build_model_batch) never calls _validate_root_availability. Offline model-format batches skip it too, so the gap is older than this PR, but serving now depends on it.
Can you add the check to the native batch path, plus a serving test with a too-early anchor?
The reason will be displayed to describe this comment to others. Learn more.
Every assemble() call runs Plan.materialize. For one request, that means check(), fit_plan(), a Parquet write, an ingest into an extension index, and a new runtime index and sampler. The old code ran check() and fit_plan() once, at startup.
The serving lock also makes calls on one plan run one at a time.
Can you add the latency of a one-row assemble() call (p50 and p95) to the PR description?
| Artifacts, inference mode, serving from caller-supplied rows | Implemented. Serving builds batches in Python, the same way the in-memory engine does, with times in the DiskGraph engine's clock |
| Artifacts, inference mode, serving | Implemented. Serving uses a prepared DiskGraph index and Parquet anchors |
The reason will be displayed to describe this comment to others. Learn more.
Serving now refuses contracts that the old serving path accepted:
A token budget (max_tokens or bucket_by_length) with a graph neighborhood raises NotImplementedError, as test_serving_refuses_mixed_graph_and_token_budget_before_python_batching shows. Offline inference still handles it through the Python fallback.
Candidate sets, which the old G-SERVING-001 covered, are now refused through DG-CANDIDATE-SETS.
This row says "Implemented". Please name both cases here.
The reason will be displayed to describe this comment to others. Learn more.
The old serving path rejected repeated sample IDs ("sample IDs must be unique", rows/samples.py). The native path copies sample_id values into the batch without a check (line 407), so two anchors with the same ID now return two samples with the same ID.
Please add the check, or say why it is not needed, and add a test.
The reason will be displayed to describe this comment to others. Learn more.
PreparedBatchPlan.with_source (assembly.py line 2026) has no callers after this PR. The old ServingAssembler.assemble was the only one. It is public through kumo.pytorch.api, so please remove it with its API reference entry, or say why it stays.
The reason will be displayed to describe this comment to others. Learn more.
This text still describes the removed flow ("fetch their union"). The same wording about supplying or omitting rows is at lines 150, 238, 1098 ("Rows to supply per request"), and 1146. Please update it to describe inspection only.
54-54: Minor · Data Integrity & Integration · Quick win
Metadata keys that match structural columns overwrite them in serving_anchors.
serving_anchors merges request metadata into the same column dictionary that holds sample, entity, and the optional time and split columns. Because SampleRequest accepts any metadata key, a key such as "entity" replaces the entity values written to Parquet. The returned AnchorTable then reads the replaced values as the entity key, so anchors can silently bind to the wrong entity.
Either reject metadata keys that collide with the structural column names before writing, or write metadata under separate physical column names and bind them through AnchorTable.metadata.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
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
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.
Fixes #501. Stacked on #379.
Summary
Online serving now accepts the artifact, an open DiskGraph plan, and a Parquet anchor table. It uses the saved encoders and the same native batching path as offline inference. Multiple servers sharing one plan serialize requests while its sampler is bound.
Breaking change. Callers that pass fetched rows and Python requests receive an explicit refusal. The caller owns the index and controls when its source data is refreshed. The row-fetch specification remains available for inspection.
Testing
Change map
File-by-file change map