Skip to content

Fix the Kumo Transaction DiskGraph example startup - #524

Merged
bberger62 merged 4 commits into
mainfrom
codex/transaction-managed-diskgraph
Nov 25, 2026
Merged

bberger62 merged 4 commits into
mainfrom
codex/transaction-managed-diskgraph

Conversation

@bberger62

@bberger62 bberger62 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restore the Kumo Transaction Blueprint v2 example on current kumo-pytorch. The runner used DiskGraphEngine(index=args.index or args.output / "index", ...). That meant every invocation passed index=, including runs that omitted the --index flag. The current constructor raises a TypeError before the runner can prepare data or start training.

The runner came in through the Transaction source sync in #520. Its dependency file follows Kumo main, which moved to managed DiskGraph storage in #403.

Runner behavior

  • Build from Parquet. The runner configures the scratch root, then passes the example's Parquet Dataset to prepare() with a current DiskGraphEngine(). It still supplies the training cutoff for column statistics during ingest. Kumo assigns the build ID and stores the base under <scratch-dir>/indexes/<build-id>. The runner prints the completed index path.
  • Reuse a completed build. --index PATH opens the stored schema and build identity through DiskGraphEngine.from_snapshot(). The index must be under the same configured scratch root. The runner prepares from that binding and reads the anchor Parquet separately, so training works after the original source tables are moved.
  • Install matching dependencies. Add kumo-settings to the example's Git requirements alongside kumo-pytorch and diskgraph. The README now refreshes all three together. Pin each Git requirement to the same SHA for a reproducible setup.

The example README and changelog explain the new options. The sync guide and inventory record the local adaptations so they can be carried forward during the next Transaction source sync.

Usage and compatibility

The example README now starts its quickstart with cd packages/experimental/kumo-transaction so the install command can find the example requirements. With the example dependencies installed and seed data prepared, run the commands below from the Kumo Engine repository root. Use the index path printed by the first run as the --index value in the second.

cd packages/experimental/kumo-transaction

python examples/kumo-engine/run.py --scratch-dir ./kumo-scratch

python examples/kumo-engine/run.py \
  --scratch-dir ./kumo-scratch \
  --index ./kumo-scratch/indexes/BUILD_ID \
  --anchors ./outputs/kumo-engine/data/anchors.parquet

--scratch-dir defaults to ~/.cache/kumo-engine when omitted. Pass the storage root to --scratch-dir and the completed index directory beneath it to --index. Older indexes without a managed build ID need to be rebuilt from Parquet.

Native CI

The kumo-pytorch DiskGraph workflow runs the example smoke in a separate kumo-transaction-diskgraph-smoke job using its existing DiskGraph wheel artifact. The job imports diskgraph and kumo.pytorch.api before pytest so missing dependencies fail the check. Changes to the example, smoke test, smoke configuration, or Transaction package metadata trigger the workflow alongside the existing backend paths.

After integrating main with merged #399, a separate commit migrates the Parquet column-rename test to request_batches(). The test binds Python requests and accounted for five failures in the native PyTorch suite on main. Baseline CI

Change map

File-by-file change map.

Testing Done

  • Real DiskGraph smoke. With a native wheel built from the matching DiskGraph source tree, the test generated synthetic inputs and ran one CPU training step on a fresh index. It moved the original source tables aside and ran a second training step against that same index. The test checked for model weights from both runs and verified that reuse created no second index.
  • Transaction package. The local CPU unit, contract, and recipe-smoke suite had 1,144 passes and 175 skips. Ruff lint and formatting passed. Package-wide Pyright reported diagnostics in untouched src/tfm files.
  • Workflow and quickstart. The workflow security check passed, the quickstart paths and shell syntax were verified, and the native dependency check failed as expected in an environment without the wheel.
  • Review follow-up. The example smoke passed again with the native wheel from the refreshed main source tree. The local PyTorch suite had 2,935 passes and three CUDA-only skips, including all 13 Parquet column-rename tests.
  • GitHub CI. The new native Transaction job passed on the updated PR head and executed the smoke through both build and reuse. The standard Transaction Blueprint job passed its style, CPU suite, and wheel legal-metadata checks on the initial head. Native Transaction smoke · Initial Transaction Blueprint job

Checklist

  • Documented managed storage and reuse of completed builds.
  • Added CPU smoke coverage for the example's build and reuse paths.

@copy-pr-bot

copy-pr-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@bberger62
bberger62 temporarily deployed to gha-kumo-workflow-tests November 24, 2026 22:54 — with GitHub Actions Inactive
@bberger62

bberger62 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Change map

The Blueprint example failed at startup with current kumo-pytorch. The runner should complete CPU training both after a fresh ingest and when reopening the same managed index with its source tables unavailable.

File Function / scope What changed Why
packages/experimental/kumo-transaction/examples/kumo-engine/run.py main and CLI options Configure Kumo scratch storage, build from a dataset or reopen a completed index, and report the index path. Restore startup with the current engine and let callers reuse the resulting build.
packages/experimental/kumo-transaction/examples/kumo-engine/requirements.txt Example install Resolve kumo-settings from the same Kumo source as DiskGraph and kumo-pytorch. The Python API depends on settings and the package was unavailable on PyPI.
packages/experimental/kumo-transaction/examples/kumo-engine/README.md, packages/experimental/kumo-transaction/CHANGELOG.md Installation, managed storage, and release note Start the quickstart in the Transaction package and document setup, the scratch root, and index reuse. Resolve the example paths from a repository checkout and explain how to migrate index paths.
packages/experimental/kumo-transaction/SYNC.md, packages/experimental/kumo-transaction/UPSTREAM.json Source sync provenance Record the Engine-specific adaptations and local smoke test while preserving the upstream source hashes. Carry the integration fix through future upstream syncs.
packages/experimental/kumo-transaction/tests/recipe_smoke/test_kumo_engine_example.py Blueprint CLI smoke Seed synthetic data, run one CPU training step on a fresh index, move the source tables aside, and run again against the same index. Exercise both startup paths against a real DiskGraph runtime and verify reuse.
.github/workflows/kumo-pytorch-diskgraph.yml Transaction smoke job and triggers Reuse the native wheel artifact in a separate job, require both backend imports, and run the example smoke. Catch regressions in the real build and reuse paths when the example or backend changes.
packages/experimental/kumo-pytorch/tests/test_column_renames.py test_column_bindings Pass the test's Python requests to request_batches() after #399. Restore five baseline cases in the native workflow that this PR now triggers.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

.coderabbit.yaml has unrecognized properties

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"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

No actionable comments were generated in the recent review.

Walkthrough

The Kumo Engine example now configures a managed scratch directory and can create or reuse a DiskGraph index. Its installation instructions include kumo-settings, and its documentation describes index reuse and anchor input. A smoke test checks index creation and reuse after source tables are removed. The workflow runs this smoke test when relevant example or test files change. A column binding test now uses task.request_batches.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as run.py
  participant Settings as kumo.settings
  participant Engine as DiskGraphEngine
  participant Prepare as api.prepare
  Runner->>Settings: Configure scratch directory
  alt No index supplied
    Runner->>Runner: Create dataset and DiskGraphEngine
  else Index supplied
    Runner->>Engine: Load snapshot from index path
  end
  Runner->>Prepare: Prepare contract with dataset and engine
  Runner->>Runner: Print resulting engine index path
Loading
Merge Risk: Minimal · up to 3a1b1

This change restores the Kumo Engine example so it starts with the current DiskGraph APIs and supports reusing a stored index. It is covered by a smoke test and a CI job. The changes are confined to an experimental example, its tests and documentation, so no merge-blocking risk remains.

Security architecture risk: Minimal · up to 3a1b1

The example now uses managed index storage and can reuse a completed index. The inspected change does not introduce a service endpoint, grant new privileges, or weaken the existing index checks.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The new index-selection path is reachable by the local example operator and runs with that process's filesystem access. An operator who can also choose the scratch root selects the storage boundary, so the same-root check is not independent tenant authorization.

Trust Boundaries and Controls

  • observed — The reuse path resolves and checks the index against the configured root before opening it. The binding checks completeness and requires a physical build ID. The CLI supplies no separate expected provenance ID, so it does not authenticate who produced the index.

Resilience and Maintainability Implications

  • observed — Ingest stages writes in a temporary directory before publishing the base. Reuse checks that task and cache paths are separate from that base, and each task creates its own directory exclusively. The runner closes the producer before closing the task and plan on normal exit or exception.
Pre-merge checks: Passed 2 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Change Map Design Review Inconclusive The check assesses the Change map in the PR conversation comment that starts with <!-- kumo-pr-change-map -->. That comment is not in the supplied context. The review comments section states that no… Provide the body of the PR conversation comment that starts with <!-- kumo-pr-change-map --> (the comment linked as issuecomment-7146795788, or the latest comment with that marker). Re-run the check with that text. The check will then ass…
Passed Passed checks: 2 passed

Check name Status Explanation
Pr Size Passed PR size check: the reviewed range (refs/coderabbit/pre-merge-check/base to head) changes 9 files. Git name-status lists 8 modified (M) and 1 added (A) file: .github/workflows/kumo-pytorch-diskgraph.ym…
Public Resource Access Passed The diff adds or changes only a few external resource references that the changed code needs. I checked each one for anonymous access. 1. `packages/experimental/kumo-transaction/examples/kumo-engine/r…
Full details: Pr Size

Explanation

PR size check: the reviewed range (refs/coderabbit/pre-merge-check/base to head) changes 9 files. Git name-status lists 8 modified (M) and 1 added (A) file: .github/workflows/kumo-pytorch-diskgraph.yml, packages/experimental/kumo-pytorch/tests/test_column_renames.py, packages/experimental/kumo-transaction/CHANGELOG.md, SYNC.md, UPSTREAM.json, examples/kumo-engine/README.md, examples/kumo-engine/requirements.txt, examples/kumo-engine/run.py, and tests/recipe_smoke/test_kumo_engine_example.py. A rename-aware count also gives 9. The threshold is 40 files, so the check passes. Line counts were ignored, as the check requires.

Full details: Public Resource Access

Explanation

The diff adds or changes only a few external resource references that the changed code needs. I checked each one for anonymous access. 1. packages/experimental/kumo-transaction/examples/kumo-engine/requirements.txt adds kumo-settings @ git+https://github.com/NVIDIA/kumo-engine.git@main#subdirectory=packages/kumo-settings. This is a package source location needed to install the example. Anonymous checks succeeded: https://api.github.com/repos/NVIDIA/kumo-engine returned HTTP 200 with "private": false and "visibility": "public". https://github.com/NVIDIA/kumo-engine/tree/main/packages/kumo-settings returned HTTP 200. The packages/kumo-settings subdirectory also exists in the reviewed head tree. The existing diskgraph and kumo-pytorch Git lines are unchanged. Only the comment line above them was edited. 2. .github/workflows/kumo-pytorch-diskgraph.yml adds a transaction-smoke job that uses actions/checkout@df4cb1c.... Anonymous https://github.com/actions/checkout returned HTTP 200. The job also uses the in-repo local action ./.github/actions/kumo-pytorch-setup, which is a repository location, not an external reference. The new path filters are repository-local. The README, CHANGELOG, SYNC.md, UPSTREAM.json, run.py, the smoke test, and the column-rename test add no URLs or package source locations. The README's ../../recipes/blueprint_v2/config.yaml link is relative and is not changed by this PR. The PR description's CI and change-map links are not part of the repository changes. They are not needed to understand, build, test, or use the changed code, so they are out of scope. No added or modified reference was confirmed inaccessible.

Full details: Change Map Design Review

Explanation

The check assesses the Change map in the PR conversation comment that starts with &lt;!-- kumo-pr-change-map --&gt;. That comment is not in the supplied context. The review comments section states that no review threads were returned. I searched the checkout for the marker and found only a reference in docs/development/review.md, which describes the convention but does not contain the comment. The review refs confirm the changed-file set: 9 files, including the workflow, kumo-pytorch test, Transaction CHANGELOG, SYNC.md, UPSTREAM.json, example README, requirements.txt, run.py, and the new recipe smoke test. The PR description links the change map at issuecomment-7146795788, but I have no tool that fetches PR comments. Without the table, I cannot check whether each row states an observed failure, a smallest sufficient change, focused verification, or a stopping condition. I also cannot check whether the descriptions are accurate or omit behavior. File coverage alone cannot establish the design review, so this check cannot pass or fail on current evidence.

Resolution

Provide the body of the PR conversation comment that starts with &lt;!-- kumo-pr-change-map --&gt; (the comment linked as issuecomment-7146795788, or the latest comment with that marker). Re-run the check with that text. The check will then assess each Change map row against the diff and the code. It will check the observed failure, the inspected existing behavior, the smallest sufficient change, the focused verification, and the stopping condition for each change.

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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between dff4ff4 and 3a1b17c.

Files selected for processing: 4

  • .github/workflows/kumo-pytorch-diskgraph.yml
  • packages/experimental/kumo-pytorch/tests/test_column_renames.py
  • packages/experimental/kumo-transaction/examples/kumo-engine/README.md
  • packages/experimental/kumo-transaction/examples/kumo-engine/run.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@bberger62
bberger62 requested a review from alan-kumo November 24, 2026 22:57
@bberger62

Copy link
Copy Markdown
Contributor Author

/ok to test dff4ff4

@bberger62
bberger62 enabled auto-merge (squash) November 24, 2026 23:41

@alan-kumo alan-kumo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two follow-ups on the native smoke and the example quickstart.

@bberger62
bberger62 temporarily deployed to gha-kumo-workflow-tests November 25, 2026 16:01 — with GitHub Actions Inactive
@bberger62

Copy link
Copy Markdown
Contributor Author

/ok to test 3a1b17c

@bberger62
bberger62 requested a review from alan-kumo November 25, 2026 16:41

@alan-kumo alan-kumo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@bberger62

Before merging, the GCS check still needs attention. GitHub failed to fetch its workflow environment before any tests ran. The change-map check passed on rerun.

@bberger62
bberger62 merged commit c8950c2 into main Nov 25, 2026
132 of 134 checks passed
@bberger62
bberger62 deleted the codex/transaction-managed-diskgraph branch November 25, 2026 17:16

This branch was previously deployed

1 inactive deployment
gha-kumo-workflow-tests — 3a1b17ca Deployed Nov 25, 2026 by bberger62 via import #3279
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