Skip to content

Share aggregate reductions and history frames for feature generation - #117

Closed
alan-kumo wants to merge 2 commits into
NVIDIA:rdl-basefrom
alan-kumo:rdl-base
Closed

alan-kumo wants to merge 2 commits into
NVIDIA:rdl-basefrom
alan-kumo:rdl-base

Conversation

@alan-kumo

@alan-kumo alan-kumo commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Feature generation recomputed numeric moments and categorical hashes per reduction, and traversed/decoded overlapping history windows. Fuse ungrouped reductions per frame/anchor/column, reuse compatible broader aggregate-only frames, and parallelize independent anchors in the existing configured thread pool. Preserve each anchor's row order and floating accumulation order.

Platform dependency/benchmark PR: https://github.com/kumo-ai/rdl-platform/pull/91. Requested in https://github.com/kumo-ai/rdl-platform/issues/88. Original-value raw Arrow output is separate: https://github.com/kumo-ai/rdl-platform/pull/89.

Upstream publication of fork PR #1, targeting rdl-base. The diff is identical to the reviewed fork PR. Benchmarks below were run against feature commit 926c679a577f3ad54c9c829b7e77820d2697f106; this PR's head is the fork merge commit 28ea7bc18e38e010492645b7dc4d3ff46234dbbe.

Change map

Maintained file map.

Testing Done

Same platform loader and inspectable format, five alternating base/head pairs at each matched thread count:

Threads Base median Fixed median Speedup
1 0.26907 s 0.15138 s 1.777×
4 0.26628 s 0.09934 s 2.681×

All 20 hashes match exactly for nonconstant numerical values, original categorical strings, validity and sample/entity/time identity. Synthetic CPU feature loader: 128 anchors, batch 64, 256 rows/anchor, 102 reductions across full/30-day/90-day windows. Queries/adaptation/assembly included; ingestion/fitting/parity conversion excluded. This is not a training or GPU speedup claim.

Reproduction, every observation and native profiles. Decoded rows 48,000→32,640; traversal accounting 98,304→32,768.

  • Built a real ABI3 wheel from this committed source, SHA256 a3635cddaa1ef569693cda205b045cfeef33fd4435c8de6b062d3d780b810987.
  • Five Rust temporal tests pass: cd packages/diskgraph; CARGO_TARGET_DIR=<cache> RUSTFLAGS='-C target-feature=+aes,+sse2' cargo test --release -p diskgraph-pybind --lib temporal_query.
  • 218 relevant native Python temporal-limit/string-lookup/token-stream tests pass against that wheel.
  • 903 platform tests pass with --require-imports, including both-engine conformance. New reference/thread/decode-budget tests pass; baseline fails 988 > 512 physical rows. Raw-column and request companion checks also pass (10 and 92 tests).
  • Fresh-context independent review: three rounds, no blockers. Fixed empty-anchor validation before fusion registration, retained the light distinct-only HashSet path, and corrected the platform validation fixture to reach the intended stage.

Grouped reductions and mixed sequence frames retain their prior paths. Window sharing requires matching root/path/clock/distinct and covering projection/bounds. No approved answer, tolerance, sampling behavior, public API or dependency changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 26, 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.

@alan-kumo
alan-kumo had a problem deploying to gha-kumo-workflow-tests October 26, 2026 17:55 — with GitHub Actions Failure
@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@alan-kumo

Copy link
Copy Markdown
Collaborator Author

Change map

Requested requirement: accelerate aggregate feature generation without changing raw categories, window selection or floating accumulation order. Baseline multi-window probe decodes988rows from512input rows and scans each reduction separately. The smallest sufficient native change shares compatible aggregate-only frames and column reductions; raw Arrow output is in platform PR89. Stop when exact baseline/head output hashes and thread1/4 parity hold, native/platform checks pass, and paired loader measurements show the actual gain. This is the upstream publication of the reviewed change from alan-kumo#1.

File Function / scope What changed Why
packages/diskgraph/diskgraph-pybind/src/temporal_query.rs reduce_many, window_frame, execute, native tests Share numeric moments/mode+distinct hashing; reuse broader aggregate frames; parallelize independent anchors; add empty/null/tie/window tests Avoid repeated scans/decoding while preserving each anchor's row and addition order
packages/diskgraph/diskgraph-pybind/src/lib.rs SamplerEngine.query_temporal Execute inside the existing engine thread pool Honor configured thread count for parallel aggregate anchors

@alan-kumo alan-kumo changed the title Rdl base Share aggregate reductions and history frames for feature generation Oct 26, 2026
@bberger62
bberger62 deleted the branch NVIDIA:rdl-base November 3, 2026 00:34
@bberger62 bberger62 closed this Nov 3, 2026

This branch had an error being deployed

1 failed deployment
gha-kumo-workflow-tests — 28ea7bc1 Deployed Oct 26, 2026 by alan-kumo via import #764
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