Repository navigation
feat: add native vs Python neighbor-sampler timing charts - #6
Merged
Merged
Conversation
Open the Phase 2 timing-chart slice with a synthetic-graph benchmark that verifies ADR-005 parity before measuring graph_sampler against the Python reference sampler, plus schema tests and docs. Co-authored-by: Nithilan Kumaran <sathariels@users.noreply.github.com>
Commit Release-build JSON, markdown, and SVG from the synthetic ADR-005 workload. Infer compiler id/version when CMake omits them, and chart median throughput so both bars stay readable. Co-authored-by: Nithilan Kumaran <sathariels@users.noreply.github.com>
sathariels
marked this pull request as ready for review
September 13, 2026 21:53
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Opens the Phase 2 timing-chart slice: a reproducible C++ native vs Python reference
sample_neighborsbenchmark with measured stored evidence.python/sagerec_sampler_benchmark.pybuilds a deterministic synthetic CSR, verifies ADR-005 without-replacement parity, then timesgraph_sampler.BipartiteCSR.sample_neighborsagainstsagerec_reference_samplerwith warm-up and multiple measured repetitions.reference_median_seconds / native_median_secondsfrom measured seconds only.k, replacement policy, seed, build type, compiler, Python, CPU, and the timing statistic.scripts/run_sampler_timing.pywrites:results/sampler_timing.jsonresults/sampler_timing.mdresults/sampler_timing.svg--source movielens-100kuses existing train-onlyprocessed/artifacts and never downloads.python_binding_smokediscovers the new tests.Docs no longer mark Phase 2 timing charts as closed.
Does not invent ML quality metrics, retcon MF/GraphSAGE JSON, add MovieLens 1M, GCN, PyG NeighborLoader, multi-seed leaderboards, or Rust.
Measured locally (Release, this agent environment)
Copied from the committed JSON (synthetic 512×1024 graph, degree 32, k=10, 4000 queries, seed 7, 3 warm-up + 9 measured reps, GNU 13.3.0, Python 3.12.3):
graph_samplerMedian speedup (reference / native): 111.177×. One-machine sampler evidence, not a production latency or SOTA claim.
How to verify
Locally: Release CTest 17/17 passed, including
python_binding_smoke. Default CI must stay on the synthetic path.