velographx 0.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- velographx-0.8.2/.github/CODEOWNERS +8 -0
- velographx-0.8.2/.github/ISSUE_TEMPLATE/security.md +13 -0
- velographx-0.8.2/.github/dependabot.yml +14 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-ablation.yml +148 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-fifth-dataset-evaluation.yml +115 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-fifth-dataset-freeze.yml +78 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-final-validation.yml +95 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-fourth-dataset.yml +76 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-heldout-final.yml +81 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-heldout-validation.yml +99 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-multiroot-validation.yml +125 -0
- velographx-0.8.2/.github/workflows/adaptive-policy-v2-calibration.yml +113 -0
- velographx-0.8.2/.github/workflows/adaptive-selector-refinement.yml +113 -0
- velographx-0.8.2/.github/workflows/benchmark-preflight.yml +49 -0
- velographx-0.8.2/.github/workflows/ca-maintenance-ab.yml +198 -0
- velographx-0.8.2/.github/workflows/canonical-publication-campaign.yml +189 -0
- velographx-0.8.2/.github/workflows/canonicalization-ab.yml +143 -0
- velographx-0.8.2/.github/workflows/ci-scale-evidence.yml +200 -0
- velographx-0.8.2/.github/workflows/ci.yml +267 -0
- velographx-0.8.2/.github/workflows/cpu-scaling-evidence.yml +197 -0
- velographx-0.8.2/.github/workflows/current-capacity-validation.yml +187 -0
- velographx-0.8.2/.github/workflows/dedicated-capacity-campaign.yml +115 -0
- velographx-0.8.2/.github/workflows/dynamic-bfs-multiroot-evidence.yml +189 -0
- velographx-0.8.2/.github/workflows/external-boost-storage.yml +99 -0
- velographx-0.8.2/.github/workflows/external-graphbolt-dzig-gap-publication.yml +223 -0
- velographx-0.8.2/.github/workflows/external-networkit-baseline.yml +197 -0
- velographx-0.8.2/.github/workflows/external-networkit-epinions-multiroot.yml +128 -0
- velographx-0.8.2/.github/workflows/external-networkit-native-multidataset.yml +239 -0
- velographx-0.8.2/.github/workflows/external-risgraph-baseline.yml +225 -0
- velographx-0.8.2/.github/workflows/external-sortledton-storage.yml +191 -0
- velographx-0.8.2/.github/workflows/external-teseo-storage.yml +126 -0
- velographx-0.8.2/.github/workflows/freeze-adaptive-selector.yml +18 -0
- velographx-0.8.2/.github/workflows/gap-canonical-multiroot.yml +251 -0
- velographx-0.8.2/.github/workflows/hipc2017-cpu-reimplementation.yml +156 -0
- velographx-0.8.2/.github/workflows/hosted-capability-campaign.yml +173 -0
- velographx-0.8.2/.github/workflows/hosted-ci-baseline.yml +103 -0
- velographx-0.8.2/.github/workflows/hosted-graphbolt-gap-comparison.yml +226 -0
- velographx-0.8.2/.github/workflows/hosted-graphbolt-gap-expanded-matrix.yml +259 -0
- velographx-0.8.2/.github/workflows/hosted-native-competitors.yml +218 -0
- velographx-0.8.2/.github/workflows/hosted-scale-cpu-evidence.yml +234 -0
- velographx-0.8.2/.github/workflows/multi-dataset-crossover.yml +167 -0
- velographx-0.8.2/.github/workflows/normalized-native-bfs.yml +139 -0
- velographx-0.8.2/.github/workflows/owens-benchmark-contract.yml +71 -0
- velographx-0.8.2/.github/workflows/public-dataset-plan.yml +61 -0
- velographx-0.8.2/.github/workflows/public-dataset-verify.yml +92 -0
- velographx-0.8.2/.github/workflows/public-small-dataset.yml +205 -0
- velographx-0.8.2/.github/workflows/publication-artifact.yml +80 -0
- velographx-0.8.2/.github/workflows/publication-readiness.yml +50 -0
- velographx-0.8.2/.github/workflows/publish-pypi.yml +106 -0
- velographx-0.8.2/.github/workflows/published-baseline-eligibility.yml +61 -0
- velographx-0.8.2/.github/workflows/python-package.yml +85 -0
- velographx-0.8.2/.github/workflows/risgraph-baseline.yml +180 -0
- velographx-0.8.2/.github/workflows/row-patch-accumulation.yml +156 -0
- velographx-0.8.2/.github/workflows/same-run-published-baseline.yml +168 -0
- velographx-0.8.2/.github/workflows/security.yml +85 -0
- velographx-0.8.2/.github/workflows/steady-state-storage.yml +227 -0
- velographx-0.8.2/.github/workflows/storage-ab-evidence.yml +91 -0
- velographx-0.8.2/.github/workflows/three-system-dynamic-bfs-campaign.yml +211 -0
- velographx-0.8.2/.gitignore +25 -0
- velographx-0.8.2/CHANGELOG.md +42 -0
- velographx-0.8.2/CITATION.cff +11 -0
- velographx-0.8.2/CMakeLists.txt +173 -0
- velographx-0.8.2/CODE_OF_CONDUCT.md +3 -0
- velographx-0.8.2/CONTRIBUTING.md +19 -0
- velographx-0.8.2/LICENSE +201 -0
- velographx-0.8.2/PKG-INFO +488 -0
- velographx-0.8.2/README.md +258 -0
- velographx-0.8.2/SECURITY.md +43 -0
- velographx-0.8.2/benchmarks/README.md +3 -0
- velographx-0.8.2/benchmarks/adaptive_policy_bfs.cpp +468 -0
- velographx-0.8.2/benchmarks/adaptive_policy_v3_guard.patch +12 -0
- velographx-0.8.2/benchmarks/backend_bfs_benchmark.cpp +71 -0
- velographx-0.8.2/benchmarks/baseline.md +15 -0
- velographx-0.8.2/benchmarks/benchmark-environment.example.json +37 -0
- velographx-0.8.2/benchmarks/campaigns/ablation.json +34 -0
- velographx-0.8.2/benchmarks/campaigns/hosted_ci_baseline.json +45 -0
- velographx-0.8.2/benchmarks/campaigns/numa.json +23 -0
- velographx-0.8.2/benchmarks/campaigns/perf_counters.json +20 -0
- velographx-0.8.2/benchmarks/campaigns/thread_scaling.json +17 -0
- velographx-0.8.2/benchmarks/campaigns/update_fraction.json +13 -0
- velographx-0.8.2/benchmarks/competitor-research-plan.json +113 -0
- velographx-0.8.2/benchmarks/compression_benchmark.cpp +96 -0
- velographx-0.8.2/benchmarks/compression_end_to_end.cpp +117 -0
- velographx-0.8.2/benchmarks/dynamic_benchmark.cpp +18 -0
- velographx-0.8.2/benchmarks/exactness_stress.cpp +207 -0
- velographx-0.8.2/benchmarks/external-baseline-manifest.json +130 -0
- velographx-0.8.2/benchmarks/external_boost_storage_bfs.cpp +192 -0
- velographx-0.8.2/benchmarks/external_networkit_native_bfs.cpp +155 -0
- velographx-0.8.2/benchmarks/external_risgraph_bfs.cpp +201 -0
- velographx-0.8.2/benchmarks/external_sortledton_storage_bfs.cpp +373 -0
- velographx-0.8.2/benchmarks/external_teseo_storage_bfs.cpp +230 -0
- velographx-0.8.2/benchmarks/fixtures/codec_calibration.csv +7 -0
- velographx-0.8.2/benchmarks/fixtures/graphbolt-bfs-output.txt +3 -0
- velographx-0.8.2/benchmarks/fixtures/graphbolt-dzig-output.txt +9 -0
- velographx-0.8.2/benchmarks/fixtures/publication-result.json +7 -0
- velographx-0.8.2/benchmarks/fixtures/result_bundle.example.json +23 -0
- velographx-0.8.2/benchmarks/graphbolt_contract_bfs.cpp +150 -0
- velographx-0.8.2/benchmarks/hipc2017_cpu_reimplementation.cpp +271 -0
- velographx-0.8.2/benchmarks/intersection_benchmark.cpp +72 -0
- velographx-0.8.2/benchmarks/large_same_run_published_reference.cpp +126 -0
- velographx-0.8.2/benchmarks/large_scale_triangle_campaign.cpp +135 -0
- velographx-0.8.2/benchmarks/native_baseline_benchmark.cpp +230 -0
- velographx-0.8.2/benchmarks/public_dataset_benchmark.cpp +81 -0
- velographx-0.8.2/benchmarks/public_update_fraction_campaign.cpp +202 -0
- velographx-0.8.2/benchmarks/publication-hardware-plan.json +106 -0
- velographx-0.8.2/benchmarks/published-baseline-eligibility.json +70 -0
- velographx-0.8.2/benchmarks/risgraph_bfs_baseline.cpp +97 -0
- velographx-0.8.2/benchmarks/row_patch_accumulation.cpp +177 -0
- velographx-0.8.2/benchmarks/same_run_published_baseline.cpp +192 -0
- velographx-0.8.2/benchmarks/static_benchmark.cpp +42 -0
- velographx-0.8.2/benchmarks/steady_state_storage.cpp +246 -0
- velographx-0.8.2/benchmarks/storage_ab_benchmark.cpp +332 -0
- velographx-0.8.2/benchmarks/thread_scaling_bfs.cpp +164 -0
- velographx-0.8.2/benchmarks/thread_scaling_workloads.cpp +110 -0
- velographx-0.8.2/benchmarks/update_fraction_campaign.cpp +64 -0
- velographx-0.8.2/cmake/VeloGraphXConfig.cmake.in +5 -0
- velographx-0.8.2/datasets/README.md +35 -0
- velographx-0.8.2/datasets/example-local-edge-list.txt +3 -0
- velographx-0.8.2/datasets/graphbolt-hosted-matrix.json +42 -0
- velographx-0.8.2/datasets/manifest.example.json +16 -0
- velographx-0.8.2/datasets/manifest.public-medium.json +16 -0
- velographx-0.8.2/datasets/manifest.public-small.json +29 -0
- velographx-0.8.2/datasets/manifest.publication-canonical.json +42 -0
- velographx-0.8.2/datasets/multi-dataset-crossover.json +49 -0
- velographx-0.8.2/datasets/public-research-plan.json +69 -0
- velographx-0.8.2/datasets/publication-benchmark-contract.json +73 -0
- velographx-0.8.2/datasets/web-google-crossover-plan.json +12 -0
- velographx-0.8.2/docs/ablation-study.md +89 -0
- velographx-0.8.2/docs/architecture.md +93 -0
- velographx-0.8.2/docs/assets/velographx-flow.svg +85 -0
- velographx-0.8.2/docs/benchmark-methodology.md +105 -0
- velographx-0.8.2/docs/canonical-publication-campaign.md +55 -0
- velographx-0.8.2/docs/canonicalization-ab-evidence.md +67 -0
- velographx-0.8.2/docs/ci-scale-evidence.md +74 -0
- velographx-0.8.2/docs/competitor-benchmarking.md +74 -0
- velographx-0.8.2/docs/controlled-hardware-execution.md +50 -0
- velographx-0.8.2/docs/dynamic-storage.md +82 -0
- velographx-0.8.2/docs/enterprise-security.md +83 -0
- velographx-0.8.2/docs/external-baseline-timing-contract.md +53 -0
- velographx-0.8.2/docs/external-dynamic-baselines.md +135 -0
- velographx-0.8.2/docs/gap-canonical-multiroot.md +80 -0
- velographx-0.8.2/docs/graph-abstraction.md +111 -0
- velographx-0.8.2/docs/graphbolt-dzig-gap-benchmark-contract.md +52 -0
- velographx-0.8.2/docs/hosted-ci-baseline.md +46 -0
- velographx-0.8.2/docs/hosted-native-competitors.md +78 -0
- velographx-0.8.2/docs/issue-10-phases.md +15 -0
- velographx-0.8.2/docs/limitations.md +71 -0
- velographx-0.8.2/docs/memory-budget.md +3 -0
- velographx-0.8.2/docs/multi-dataset-crossover.md +63 -0
- velographx-0.8.2/docs/native-competitor-benchmarks.md +57 -0
- velographx-0.8.2/docs/native-competitors.md +71 -0
- velographx-0.8.2/docs/normalized-native-bfs.md +35 -0
- velographx-0.8.2/docs/observability.md +3 -0
- velographx-0.8.2/docs/performance-observability.md +16 -0
- velographx-0.8.2/docs/prompt-coverage.md +62 -0
- velographx-0.8.2/docs/publication-hardware-methodology.md +47 -0
- velographx-0.8.2/docs/published-baseline-eligibility.md +57 -0
- velographx-0.8.2/docs/related-work-positioning.md +46 -0
- velographx-0.8.2/docs/research/ablation-plan.md +3 -0
- velographx-0.8.2/docs/research/compression.md +3 -0
- velographx-0.8.2/docs/research/dynamic-storage.md +3 -0
- velographx-0.8.2/docs/research/incremental-computation.md +3 -0
- velographx-0.8.2/docs/research/landscape-2026.md +48 -0
- velographx-0.8.2/docs/research/multicore.md +3 -0
- velographx-0.8.2/docs/research/novelty-ledger-addendum.md +3 -0
- velographx-0.8.2/docs/research/novelty-ledger.md +23 -0
- velographx-0.8.2/docs/research/numa.md +3 -0
- velographx-0.8.2/docs/research/out-of-core.md +3 -0
- velographx-0.8.2/docs/research/peer-baseline-eligibility.md +56 -0
- velographx-0.8.2/docs/research/references.md +11 -0
- velographx-0.8.2/docs/research/simd-kernels.md +3 -0
- velographx-0.8.2/docs/roadmap.md +14 -0
- velographx-0.8.2/docs/row-patch-accumulation-evidence.md +80 -0
- velographx-0.8.2/docs/same-run-published-baseline.md +66 -0
- velographx-0.8.2/docs/storage-ab-evidence.md +68 -0
- velographx-0.8.2/docs/teseo-storage-evidence.md +48 -0
- velographx-0.8.2/docs/three-system-dynamic-bfs-campaign.md +61 -0
- velographx-0.8.2/examples/basic.cpp +9 -0
- velographx-0.8.2/examples/dynamic_transactions.cpp +10 -0
- velographx-0.8.2/include/velographx/algorithms.hpp +15 -0
- velographx-0.8.2/include/velographx/csr_graph.hpp +44 -0
- velographx-0.8.2/include/velographx/graph_access.hpp +186 -0
- velographx-0.8.2/include/velographx/incremental/bfs.hpp +374 -0
- velographx-0.8.2/include/velographx/incremental/connected_components.hpp +109 -0
- velographx-0.8.2/include/velographx/incremental/dijkstra.hpp +51 -0
- velographx-0.8.2/include/velographx/incremental/kcore.hpp +132 -0
- velographx-0.8.2/include/velographx/incremental/pagerank.hpp +323 -0
- velographx-0.8.2/include/velographx/incremental/sssp.hpp +71 -0
- velographx-0.8.2/include/velographx/incremental/triangles.hpp +81 -0
- velographx-0.8.2/include/velographx/incremental/weighted_sssp.hpp +92 -0
- velographx-0.8.2/include/velographx/io/binary_graph.hpp +22 -0
- velographx-0.8.2/include/velographx/io.hpp +7 -0
- velographx-0.8.2/include/velographx/kernels/cpu_features.hpp +16 -0
- velographx-0.8.2/include/velographx/kernels/intersection.hpp +202 -0
- velographx-0.8.2/include/velographx/memory/aligned_allocator.hpp +21 -0
- velographx-0.8.2/include/velographx/metrics/runtime_metrics.hpp +7 -0
- velographx-0.8.2/include/velographx/runtime/degree_frontier_scheduler.hpp +63 -0
- velographx-0.8.2/include/velographx/runtime/execution_plan.hpp +79 -0
- velographx-0.8.2/include/velographx/runtime/frontier.hpp +20 -0
- velographx-0.8.2/include/velographx/runtime/numa.hpp +83 -0
- velographx-0.8.2/include/velographx/runtime/numa_policy.hpp +152 -0
- velographx-0.8.2/include/velographx/runtime/numa_scheduler.hpp +70 -0
- velographx-0.8.2/include/velographx/runtime/partitioner.hpp +67 -0
- velographx-0.8.2/include/velographx/runtime/push_pull.hpp +3 -0
- velographx-0.8.2/include/velographx/runtime/thread_pool.hpp +43 -0
- velographx-0.8.2/include/velographx/runtime/work_stealing_pool.hpp +197 -0
- velographx-0.8.2/include/velographx/storage/async_partition_loader.hpp +69 -0
- velographx-0.8.2/include/velographx/storage/compressed_adjacency.hpp +244 -0
- velographx-0.8.2/include/velographx/storage/compressed_decode_simd.hpp +180 -0
- velographx-0.8.2/include/velographx/storage/compression_policy.hpp +53 -0
- velographx-0.8.2/include/velographx/storage/consolidation.hpp +165 -0
- velographx-0.8.2/include/velographx/storage/dynamic_graph.hpp +815 -0
- velographx-0.8.2/include/velographx/storage/file_prefetch.hpp +42 -0
- velographx-0.8.2/include/velographx/storage/io_uring_prefetch.hpp +107 -0
- velographx-0.8.2/include/velographx/storage/memory_budget.hpp +14 -0
- velographx-0.8.2/include/velographx/storage/partition_cache.hpp +121 -0
- velographx-0.8.2/include/velographx/storage/partition_file.hpp +107 -0
- velographx-0.8.2/include/velographx/storage/temporal_graph.hpp +111 -0
- velographx-0.8.2/include/velographx/storage/weighted_dynamic_graph.hpp +110 -0
- velographx-0.8.2/include/velographx/types.hpp +8 -0
- velographx-0.8.2/paper/README.md +3 -0
- velographx-0.8.2/paper/outline.md +15 -0
- velographx-0.8.2/pyproject.toml +67 -0
- velographx-0.8.2/python/CMakeLists.txt +22 -0
- velographx-0.8.2/python/README.md +53 -0
- velographx-0.8.2/python/bindings.cpp +52 -0
- velographx-0.8.2/scripts/perf_profile.sh +69 -0
- velographx-0.8.2/scripts/prepare_publication_datasets.py +153 -0
- velographx-0.8.2/scripts/run_baseline.sh +6 -0
- velographx-0.8.2/scripts/run_canonical_dataset_campaign.py +270 -0
- velographx-0.8.2/scripts/run_capacity_campaign.py +262 -0
- velographx-0.8.2/scripts/run_dynamic_benchmark.sh +5 -0
- velographx-0.8.2/src/algorithms.cpp +116 -0
- velographx-0.8.2/src/csr_graph.cpp +63 -0
- velographx-0.8.2/src/io.cpp +54 -0
- velographx-0.8.2/tests/package_consumer/CMakeLists.txt +7 -0
- velographx-0.8.2/tests/package_consumer/main.cpp +7 -0
- velographx-0.8.2/tests/package_consumer/run_consumer_test.cmake.in +40 -0
- velographx-0.8.2/tests/test_async_partition_loader.cpp +59 -0
- velographx-0.8.2/tests/test_compression.cpp +115 -0
- velographx-0.8.2/tests/test_compression_policy.cpp +40 -0
- velographx-0.8.2/tests/test_consolidation_controller.cpp +59 -0
- velographx-0.8.2/tests/test_degree_frontier_scheduler.cpp +41 -0
- velographx-0.8.2/tests/test_dynamic.cpp +187 -0
- velographx-0.8.2/tests/test_execution_plan.cpp +58 -0
- velographx-0.8.2/tests/test_graph_access_adl.cpp +92 -0
- velographx-0.8.2/tests/test_incremental.cpp +43 -0
- velographx-0.8.2/tests/test_incremental_bfs_deletion.cpp +184 -0
- velographx-0.8.2/tests/test_incremental_components_deletion.cpp +43 -0
- velographx-0.8.2/tests/test_io.cpp +4 -0
- velographx-0.8.2/tests/test_io_hardening.cpp +54 -0
- velographx-0.8.2/tests/test_kcore_localized.cpp +52 -0
- velographx-0.8.2/tests/test_kernels.cpp +59 -0
- velographx-0.8.2/tests/test_numa.cpp +20 -0
- velographx-0.8.2/tests/test_numa_partitioner.cpp +45 -0
- velographx-0.8.2/tests/test_numa_policy.cpp +53 -0
- velographx-0.8.2/tests/test_numa_scheduler.cpp +35 -0
- velographx-0.8.2/tests/test_pagerank_localized.cpp +118 -0
- velographx-0.8.2/tests/test_partition_cache.cpp +42 -0
- velographx-0.8.2/tests/test_partition_file.cpp +37 -0
- velographx-0.8.2/tests/test_randomized_dynamic.cpp +127 -0
- velographx-0.8.2/tests/test_static.cpp +42 -0
- velographx-0.8.2/tests/test_storage_independence.cpp +63 -0
- velographx-0.8.2/tests/test_temporal.cpp +47 -0
- velographx-0.8.2/tests/test_weighted_sssp.cpp +109 -0
- velographx-0.8.2/tests/test_work_stealing.cpp +59 -0
- velographx-0.8.2/tests/test_work_stealing_stress.cpp +43 -0
- velographx-0.8.2/tools/README.md +11 -0
- velographx-0.8.2/tools/ablation_suite.py +99 -0
- velographx-0.8.2/tools/build_result_artifact.py +140 -0
- velographx-0.8.2/tools/calibrate_codec_policy.py +110 -0
- velographx-0.8.2/tools/capture_benchmark_environment.py +186 -0
- velographx-0.8.2/tools/competitor_benchmark.py +280 -0
- velographx-0.8.2/tools/configure_publication_cpu.py +60 -0
- velographx-0.8.2/tools/cpu_scaling_campaign.py +373 -0
- velographx-0.8.2/tools/experiment_campaign.py +135 -0
- velographx-0.8.2/tools/finalize_canonical_publication_campaign.py +56 -0
- velographx-0.8.2/tools/generate_spdx_sbom.py +134 -0
- velographx-0.8.2/tools/hardware_campaign_driver.py +128 -0
- velographx-0.8.2/tools/materialize_gap_canonical.sh +128 -0
- velographx-0.8.2/tools/mock_external_bfs.py +40 -0
- velographx-0.8.2/tools/native_competitors/gap_bfs_json_runner.cc +84 -0
- velographx-0.8.2/tools/native_competitors/gap_wrapper.py +78 -0
- velographx-0.8.2/tools/native_competitors/lagraph_bfs_json_runner.c +71 -0
- velographx-0.8.2/tools/native_competitors/lagraph_wrapper.py +72 -0
- velographx-0.8.2/tools/native_competitors/mock_native_bfs_runner.py +45 -0
- velographx-0.8.2/tools/normalize_edge_list.py +84 -0
- velographx-0.8.2/tools/parse_graphbolt_dzig_output.py +94 -0
- velographx-0.8.2/tools/prepare_dataset.py +113 -0
- velographx-0.8.2/tools/prepare_dynamic_bfs_stream.py +84 -0
- velographx-0.8.2/tools/prepare_external_edge_stream.py +91 -0
- velographx-0.8.2/tools/prepare_graphbolt_workload.py +170 -0
- velographx-0.8.2/tools/prepare_hosted_graph_dataset.py +193 -0
- velographx-0.8.2/tools/prepare_pinned_edge_stream.py +112 -0
- velographx-0.8.2/tools/prepare_pinned_public_dataset.py +104 -0
- velographx-0.8.2/tools/prepare_risgraph_compat.py +136 -0
- velographx-0.8.2/tools/prepare_symmetric_pinned_edge_stream.py +152 -0
- velographx-0.8.2/tools/refine_adaptive_selector.py +85 -0
- velographx-0.8.2/tools/run_controlled_hardware_campaign.py +187 -0
- velographx-0.8.2/tools/run_gap_canonical_multiroot.py +278 -0
- velographx-0.8.2/tools/run_hosted_ci_baseline.py +100 -0
- velographx-0.8.2/tools/run_hosted_native_measurements.py +399 -0
- velographx-0.8.2/tools/run_networkit_dynamic_bfs.py +210 -0
- velographx-0.8.2/tools/run_resource_measurement.py +48 -0
- velographx-0.8.2/tools/run_three_system_dynamic_bfs.py +246 -0
- velographx-0.8.2/tools/security_scan.py +64 -0
- velographx-0.8.2/tools/select_bfs_root.py +117 -0
- velographx-0.8.2/tools/select_dynamic_bfs_roots.py +71 -0
- velographx-0.8.2/tools/storage_ab_campaign.py +147 -0
- velographx-0.8.2/tools/summarize_adaptive_policy.py +173 -0
- velographx-0.8.2/tools/summarize_hosted_graphbolt_matrix.py +204 -0
- velographx-0.8.2/tools/summarize_update_crossover.py +108 -0
- velographx-0.8.2/tools/validate_benchmark_preflight.py +94 -0
- velographx-0.8.2/tools/validate_campaign_readiness.py +96 -0
- velographx-0.8.2/tools/validate_competitor_research_plan.py +140 -0
- velographx-0.8.2/tools/validate_normalized_native_bfs.py +117 -0
- velographx-0.8.2/tools/validate_public_dataset_plan.py +86 -0
- velographx-0.8.2/tools/validate_publication_measurements.py +65 -0
- velographx-0.8.2/tools/validate_publication_readiness.py +76 -0
- velographx-0.8.2/tools/validate_result_bundle.py +130 -0
- velographx-0.8.2/tools/verify_graphbolt_bfs_output.py +121 -0
- velographx-0.8.2/tools/verify_public_dataset.py +101 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Security-sensitive repository surfaces
|
|
2
|
+
/.github/workflows/ @sauravsingla
|
|
3
|
+
/SECURITY.md @sauravsingla
|
|
4
|
+
/docs/enterprise-security.md @sauravsingla
|
|
5
|
+
/tools/security_scan.py @sauravsingla
|
|
6
|
+
/tools/generate_spdx_sbom.py @sauravsingla
|
|
7
|
+
/.github/dependabot.yml @sauravsingla
|
|
8
|
+
/.github/CODEOWNERS @sauravsingla
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Security vulnerability
|
|
3
|
+
description: Guidance for reporting a suspected security vulnerability
|
|
4
|
+
title: ""
|
|
5
|
+
labels: []
|
|
6
|
+
assignees: []
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Please do **not** disclose suspected vulnerabilities, exploit details, credentials, proprietary data, or sensitive information in a public issue.
|
|
10
|
+
|
|
11
|
+
Follow the private reporting guidance in [SECURITY.md](../../SECURITY.md).
|
|
12
|
+
|
|
13
|
+
If private vulnerability reporting is enabled for this repository, use GitHub's private security reporting flow.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
name: Adaptive BFS Policy Ablation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- '.github/workflows/adaptive-policy-ablation.yml'
|
|
7
|
+
- 'benchmarks/adaptive_policy_bfs.cpp'
|
|
8
|
+
- 'tools/summarize_adaptive_policy.py'
|
|
9
|
+
- 'tools/prepare_dataset.py'
|
|
10
|
+
- 'tools/prepare_pinned_edge_stream.py'
|
|
11
|
+
- 'tools/prepare_symmetric_pinned_edge_stream.py'
|
|
12
|
+
- 'datasets/manifest.public-small.json'
|
|
13
|
+
- 'include/velographx/incremental/bfs.hpp'
|
|
14
|
+
- 'include/velographx/storage/**'
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
policy-ablation:
|
|
19
|
+
runs-on: ubuntu-22.04
|
|
20
|
+
timeout-minutes: 120
|
|
21
|
+
env:
|
|
22
|
+
OMP_NUM_THREADS: '1'
|
|
23
|
+
OMP_PROC_BIND: 'true'
|
|
24
|
+
SIMPLE_UPDATE_FRACTION: '0.01'
|
|
25
|
+
EPINIONS_TEXT_SHA256: 3e42b000e66cada74053ac7f8b24de291f9837264421dc2f3730b45cc58d17b1
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v7
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: '3.12'
|
|
31
|
+
|
|
32
|
+
- name: Install build and plotting dependencies
|
|
33
|
+
run: |
|
|
34
|
+
sudo apt-get update
|
|
35
|
+
sudo apt-get install -y --no-install-recommends ninja-build
|
|
36
|
+
python -m pip install --disable-pip-version-check matplotlib
|
|
37
|
+
|
|
38
|
+
- name: Build VeloGraphX and policy harness
|
|
39
|
+
run: |
|
|
40
|
+
cmake -S . -B build/vx -G Ninja -DCMAKE_BUILD_TYPE=Release -DVELOGRAPHX_BUILD_TESTS=OFF -DVELOGRAPHX_BUILD_BENCHMARKS=ON
|
|
41
|
+
cmake --build build/vx --target velographx_external_risgraph_bfs -j 2
|
|
42
|
+
c++ -O3 -DNDEBUG -std=c++20 -Iinclude benchmarks/adaptive_policy_bfs.cpp build/vx/libvelographx.a -pthread -o build/adaptive_policy_bfs
|
|
43
|
+
|
|
44
|
+
- name: Prepare three checksum-pinned graph families
|
|
45
|
+
run: |
|
|
46
|
+
mkdir -p build/policy/datasets build/policy/runs build/policy/summary
|
|
47
|
+
|
|
48
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/policy/datasets --dataset web-Google > build/policy/web-Google-source.json
|
|
49
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/policy/datasets --dataset ca-GrQc > build/policy/ca-GrQc-source.json
|
|
50
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/policy/datasets --dataset soc-Epinions1 > build/policy/soc-Epinions1-source.json
|
|
51
|
+
|
|
52
|
+
python tools/prepare_pinned_edge_stream.py \
|
|
53
|
+
--input build/policy/datasets/web-Google.txt \
|
|
54
|
+
--output build/policy/web-Google.txt \
|
|
55
|
+
--report build/policy/web-Google-normalization.json \
|
|
56
|
+
--expected-sha256 8c0f453f1eb1e24ad145e36e542b129083237e96e585abae768927bdb70167d1 \
|
|
57
|
+
--expected-vertices 875713 --expected-edges 5105039
|
|
58
|
+
|
|
59
|
+
python tools/prepare_symmetric_pinned_edge_stream.py \
|
|
60
|
+
--input build/policy/datasets/ca-GrQc.txt \
|
|
61
|
+
--output build/policy/ca-GrQc.txt \
|
|
62
|
+
--report build/policy/ca-GrQc-normalization.json \
|
|
63
|
+
--expected-sha256 513efa8bb5c6d3d739797ca028d4a26a7df6bc20adcf3e722e18d1bcdb0e62d5 \
|
|
64
|
+
--expected-vertices 5242 --expected-source-rows 28980 --expected-self-loops 12 \
|
|
65
|
+
--expected-nonloop-pair-multiplicity 2 --expected-unique-nonloop-pairs 14484
|
|
66
|
+
|
|
67
|
+
gzip -dc build/policy/datasets/soc-Epinions1.gz > build/policy/epinions-source.txt
|
|
68
|
+
test "$(sha256sum build/policy/epinions-source.txt | awk '{print $1}')" = "$EPINIONS_TEXT_SHA256"
|
|
69
|
+
python tools/prepare_pinned_edge_stream.py \
|
|
70
|
+
--input build/policy/epinions-source.txt \
|
|
71
|
+
--output build/policy/soc-Epinions1.txt \
|
|
72
|
+
--report build/policy/soc-Epinions1-normalization.json \
|
|
73
|
+
--expected-sha256 "$EPINIONS_TEXT_SHA256" \
|
|
74
|
+
--expected-vertices 75879 --expected-edges 508837
|
|
75
|
+
|
|
76
|
+
- name: Run four-policy sweep with five repetitions
|
|
77
|
+
run: |
|
|
78
|
+
python - <<'PY'
|
|
79
|
+
import json, os, subprocess
|
|
80
|
+
from pathlib import Path
|
|
81
|
+
|
|
82
|
+
configs = {
|
|
83
|
+
'ca-GrQc': {'root':4282, 'rate':0.75, 'batches':[32,128,512,2048], 'min_reachable':1000},
|
|
84
|
+
'soc-Epinions1': {'root':763, 'rate':0.90, 'batches':[128,512,2048,8192], 'min_reachable':20000},
|
|
85
|
+
'web-Google': {'root':481807, 'rate':0.99, 'batches':[512,2048,8192,32768], 'min_reachable':100000},
|
|
86
|
+
}
|
|
87
|
+
for dataset,cfg in configs.items():
|
|
88
|
+
for batch in cfg['batches']:
|
|
89
|
+
for rep in range(1,6):
|
|
90
|
+
out = Path(f'build/policy/runs/{dataset}__{batch}__{rep}.json')
|
|
91
|
+
with out.open('w') as f:
|
|
92
|
+
subprocess.run([
|
|
93
|
+
'build/adaptive_policy_bfs', f'build/policy/{dataset}.txt', str(cfg['root']),
|
|
94
|
+
str(cfg['rate']), str(batch), os.environ['SIMPLE_UPDATE_FRACTION']
|
|
95
|
+
], stdout=f, check=True)
|
|
96
|
+
d=json.load(out.open())
|
|
97
|
+
assert d['all_policies_exact'], (dataset,batch,rep)
|
|
98
|
+
assert all(p['exact'] for p in d['policies'])
|
|
99
|
+
PY
|
|
100
|
+
|
|
101
|
+
- name: Summarize crossover and oracle regret
|
|
102
|
+
run: |
|
|
103
|
+
python tools/summarize_adaptive_policy.py --input-dir build/policy/runs --output-dir build/policy/summary | tee build/policy/summary/stdout-summary.json
|
|
104
|
+
python - <<'PY'
|
|
105
|
+
import json
|
|
106
|
+
d=json.load(open('build/policy/summary/summary.json'))
|
|
107
|
+
assert d['all_results_exact']
|
|
108
|
+
assert set(d['datasets']) == {'ca-GrQc','soc-Epinions1','web-Google'}
|
|
109
|
+
for name,row in d['datasets'].items():
|
|
110
|
+
assert row['regimes'] == 4, (name,row)
|
|
111
|
+
PY
|
|
112
|
+
|
|
113
|
+
- name: Capture immutable evidence pins
|
|
114
|
+
run: |
|
|
115
|
+
{
|
|
116
|
+
echo "velographx_sha=$(git rev-parse HEAD)"
|
|
117
|
+
echo "web_google_source_sha256=8c0f453f1eb1e24ad145e36e542b129083237e96e585abae768927bdb70167d1"
|
|
118
|
+
echo "ca_grqc_source_sha256=513efa8bb5c6d3d739797ca028d4a26a7df6bc20adcf3e722e18d1bcdb0e62d5"
|
|
119
|
+
echo "epinions_gzip_sha256=69a2dab71fa5e3a0715487599fc16ca17ddc847379325a6c765bbad6e3e36938"
|
|
120
|
+
echo "epinions_text_sha256=$EPINIONS_TEXT_SHA256"
|
|
121
|
+
echo "simple_update_fraction=$SIMPLE_UPDATE_FRACTION"
|
|
122
|
+
echo "repetitions_per_regime=5"
|
|
123
|
+
echo "one_thread=true"
|
|
124
|
+
} > build/policy/pins.txt
|
|
125
|
+
python - <<'PY' >> build/policy/pins.txt
|
|
126
|
+
import json
|
|
127
|
+
from pathlib import Path
|
|
128
|
+
|
|
129
|
+
paths = sorted(Path('build/policy/runs').glob('*.json'))
|
|
130
|
+
if not paths:
|
|
131
|
+
raise SystemExit('no policy result available for threshold pinning')
|
|
132
|
+
first = json.loads(paths[0].read_text())
|
|
133
|
+
thresholds = first.get('thresholds')
|
|
134
|
+
if not isinstance(thresholds, dict) or not thresholds:
|
|
135
|
+
raise SystemExit('policy result does not contain selector thresholds')
|
|
136
|
+
for path in paths[1:]:
|
|
137
|
+
current = json.loads(path.read_text()).get('thresholds')
|
|
138
|
+
if current != thresholds:
|
|
139
|
+
raise SystemExit(f'selector thresholds changed within run: {path}')
|
|
140
|
+
for key in sorted(thresholds):
|
|
141
|
+
print(f'selector_{key}={thresholds[key]}')
|
|
142
|
+
PY
|
|
143
|
+
|
|
144
|
+
- uses: actions/upload-artifact@v4
|
|
145
|
+
with:
|
|
146
|
+
name: adaptive-bfs-policy-ablation
|
|
147
|
+
path: build/policy/
|
|
148
|
+
retention-days: 90
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
name: Adaptive BFS Amazon0302 Frozen One-Shot Evaluation
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
frozen-evaluation:
|
|
7
|
+
runs-on: ubuntu-22.04
|
|
8
|
+
timeout-minutes: 120
|
|
9
|
+
env:
|
|
10
|
+
OMP_NUM_THREADS: '1'
|
|
11
|
+
OMP_PROC_BIND: 'true'
|
|
12
|
+
FROZEN_SELECTOR_COMMIT: '4381113005c221e6db2c19bac753a57d872e6374'
|
|
13
|
+
FROZEN_BENCHMARK_BLOB: 'c30f3459d22e61fb95abdb077aa2fd0eda445690'
|
|
14
|
+
AMAZON_GZIP_SHA256: '5f1071ac04203b1bc8fc4af5fb473818a180ff1b97e3d7bd716d789801d1f2a3'
|
|
15
|
+
AMAZON_NORMALIZED_SHA256: '12fe44abf64966ad08b371bf4befd96df6aa8cd129ecb800dd6cc5dc1a753d30'
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
with:
|
|
19
|
+
ref: '4381113005c221e6db2c19bac753a57d872e6374'
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with: {python-version: '3.12'}
|
|
22
|
+
- name: Verify frozen selector source
|
|
23
|
+
run: |
|
|
24
|
+
test "$(git rev-parse HEAD)" = "$FROZEN_SELECTOR_COMMIT"
|
|
25
|
+
test "$(git rev-parse HEAD:benchmarks/adaptive_policy_bfs.cpp)" = "$FROZEN_BENCHMARK_BLOB"
|
|
26
|
+
grep -q 'scale-conditioned-selector-owned-v3' benchmarks/adaptive_policy_bfs.cpp
|
|
27
|
+
grep -q 'vertices >= 200000' benchmarks/adaptive_policy_bfs.cpp
|
|
28
|
+
- name: Build frozen source unchanged
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update && sudo apt-get install -y --no-install-recommends ninja-build
|
|
31
|
+
cmake -S . -B build/fifth -G Ninja -DCMAKE_BUILD_TYPE=Release -DVELOGRAPHX_BUILD_TESTS=OFF
|
|
32
|
+
cmake --build build/fifth -j2
|
|
33
|
+
c++ -O3 -DNDEBUG -std=c++20 -Iinclude benchmarks/adaptive_policy_bfs.cpp build/fifth/libvelographx.a -pthread -o build/adaptive_policy_bfs
|
|
34
|
+
- name: Acquire and verify frozen amazon0302
|
|
35
|
+
run: |
|
|
36
|
+
mkdir -p build/amazon-one-shot/runs build/amazon-one-shot/summary
|
|
37
|
+
curl --fail --location --retry 3 https://snap.stanford.edu/data/amazon0302.txt.gz -o build/amazon-one-shot/amazon0302.txt.gz
|
|
38
|
+
test "$(sha256sum build/amazon-one-shot/amazon0302.txt.gz | awk '{print $1}')" = "$AMAZON_GZIP_SHA256"
|
|
39
|
+
gzip -dc build/amazon-one-shot/amazon0302.txt.gz > build/amazon-one-shot/raw.txt
|
|
40
|
+
python - <<'PY'
|
|
41
|
+
ids={}; edges=[]
|
|
42
|
+
for line in open('build/amazon-one-shot/raw.txt'):
|
|
43
|
+
if not line.strip() or line[0]=='#': continue
|
|
44
|
+
a,b=line.split()[:2]
|
|
45
|
+
if a not in ids: ids[a]=len(ids)
|
|
46
|
+
if b not in ids: ids[b]=len(ids)
|
|
47
|
+
edges.append((ids[a],ids[b]))
|
|
48
|
+
assert len(ids)==262111,(len(ids),len(edges))
|
|
49
|
+
assert len(edges)==1234877,(len(ids),len(edges))
|
|
50
|
+
with open('build/amazon-one-shot/amazon0302.txt','w') as f:
|
|
51
|
+
for a,b in edges: f.write(f'{a} {b}\n')
|
|
52
|
+
PY
|
|
53
|
+
test "$(sha256sum build/amazon-one-shot/amazon0302.txt | awk '{print $1}')" = "$AMAZON_NORMALIZED_SHA256"
|
|
54
|
+
sha256sum build/amazon-one-shot/amazon0302.txt.gz build/amazon-one-shot/raw.txt build/amazon-one-shot/amazon0302.txt > build/amazon-one-shot/checksums.txt
|
|
55
|
+
- name: Frozen one-shot performance evaluation
|
|
56
|
+
run: |
|
|
57
|
+
python - <<'PY'
|
|
58
|
+
import json,subprocess
|
|
59
|
+
from pathlib import Path
|
|
60
|
+
roots=[20802,99851,0]
|
|
61
|
+
batches=[512,2048,8192]
|
|
62
|
+
for root in roots:
|
|
63
|
+
for batch in batches:
|
|
64
|
+
for rep in range(1,6):
|
|
65
|
+
p=Path(f'build/amazon-one-shot/runs/amazon0302-r{root}__{batch}__{rep}.json')
|
|
66
|
+
with p.open('w') as f:
|
|
67
|
+
subprocess.run(['build/adaptive_policy_bfs','build/amazon-one-shot/amazon0302.txt',str(root),'0.90',str(batch),'0.01'],stdout=f,check=True)
|
|
68
|
+
d=json.load(p.open())
|
|
69
|
+
assert d['selector']=='scale-conditioned-selector-owned-v3'
|
|
70
|
+
assert d['selector_feature_cost_included_in_adaptive_timing']
|
|
71
|
+
assert d['all_policies_exact']
|
|
72
|
+
PY
|
|
73
|
+
- name: Fixed publication acceptance
|
|
74
|
+
run: |
|
|
75
|
+
python - <<'PY'
|
|
76
|
+
import glob,json,statistics
|
|
77
|
+
regs=[]; batch_reg=[]; decisions=[]; setups=[]; by_root={}; by_batch={}
|
|
78
|
+
all_exact=True
|
|
79
|
+
for fn in glob.glob('build/amazon-one-shot/runs/*.json'):
|
|
80
|
+
x=json.load(open(fn)); all_exact &= x['all_policies_exact']
|
|
81
|
+
ps={p['name']:p for p in x['policies']}; a=ps['adaptive']
|
|
82
|
+
decisions.append(a['mean_decision_us']); setups.append(a['selector_setup_us'])
|
|
83
|
+
best=min(p['total_us'] for p in ps.values()); rr=a['total_us']/best-1; regs.append(rr)
|
|
84
|
+
root=str(x['root']); batch=str(x['batch_size'])
|
|
85
|
+
by_root.setdefault(root,[]).append(rr); by_batch.setdefault(batch,[]).append(rr)
|
|
86
|
+
for i,v in enumerate(a['batch_us']):
|
|
87
|
+
b=min(p['batch_us'][i] for p in ps.values()); batch_reg.append(v/b-1)
|
|
88
|
+
batch_reg.sort(); p95=batch_reg[min(len(batch_reg)-1,int(.95*(len(batch_reg)-1)))]
|
|
89
|
+
m={
|
|
90
|
+
'dataset':'amazon0302','one_shot':True,'selector':'scale-conditioned-selector-owned-v3',
|
|
91
|
+
'frozen_selector_commit':'4381113005c221e6db2c19bac753a57d872e6374',
|
|
92
|
+
'frozen_benchmark_blob':'c30f3459d22e61fb95abdb077aa2fd0eda445690',
|
|
93
|
+
'all_exact':all_exact,'regimes':len(regs),
|
|
94
|
+
'mean_regret':statistics.mean(regs),'p95_batch_regret':p95,'worst_regime_regret':max(regs),
|
|
95
|
+
'mean_decision_us':statistics.mean(decisions),'mean_selector_setup_us':statistics.mean(setups),
|
|
96
|
+
'root_mean_regret':{k:statistics.mean(v) for k,v in by_root.items()},
|
|
97
|
+
'batch_mean_regret':{k:statistics.mean(v) for k,v in by_batch.items()},
|
|
98
|
+
'targets':{'exact':True,'mean_regret_max':0.05,'p95_batch_regret_max':0.20,'worst_regime_regret_max':0.25}
|
|
99
|
+
}
|
|
100
|
+
print(json.dumps(m,indent=2)); open('build/amazon-one-shot/summary/paper-metrics.json','w').write(json.dumps(m,indent=2)+'\n')
|
|
101
|
+
assert m['all_exact'],m
|
|
102
|
+
assert m['mean_regret']<=0.05,m
|
|
103
|
+
assert m['p95_batch_regret']<=0.20,m
|
|
104
|
+
assert m['worst_regime_regret']<=0.25,m
|
|
105
|
+
PY
|
|
106
|
+
- name: Frozen provenance
|
|
107
|
+
if: always()
|
|
108
|
+
run: |
|
|
109
|
+
{ echo evaluation=amazon0302-one-shot; echo selector_commit=$FROZEN_SELECTOR_COMMIT; echo benchmark_blob=$FROZEN_BENCHMARK_BLOB; echo selector=scale-conditioned-selector-owned-v3; echo source_transformation=false; echo tuning_after_freeze=false; echo roots=20802,99851,0; echo batches=512,2048,8192; echo repetitions=5; echo import_rate=0.90; echo gzip_sha256=$AMAZON_GZIP_SHA256; echo normalized_sha256=$AMAZON_NORMALIZED_SHA256; echo fixed_targets='exact=100%,mean<=5%,p95<=20%,worst<=25%'; } > build/amazon-one-shot/provenance.txt
|
|
110
|
+
- uses: actions/upload-artifact@v4
|
|
111
|
+
if: always()
|
|
112
|
+
with:
|
|
113
|
+
name: adaptive-amazon0302-frozen-one-shot
|
|
114
|
+
path: build/amazon-one-shot/
|
|
115
|
+
retention-days: 90
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Adaptive BFS Fifth Dataset Topology Freeze
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
paths:
|
|
5
|
+
- '.github/workflows/adaptive-policy-fifth-dataset-freeze.yml'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
freeze:
|
|
10
|
+
runs-on: ubuntu-22.04
|
|
11
|
+
timeout-minutes: 30
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with: {python-version: '3.12'}
|
|
16
|
+
- name: Acquire and validate SNAP amazon0302
|
|
17
|
+
run: |
|
|
18
|
+
mkdir -p build/fifth-freeze
|
|
19
|
+
curl --fail --location --retry 3 https://snap.stanford.edu/data/amazon0302.txt.gz -o build/fifth-freeze/amazon0302.txt.gz
|
|
20
|
+
gzip -dc build/fifth-freeze/amazon0302.txt.gz > build/fifth-freeze/raw.txt
|
|
21
|
+
python - <<'PY'
|
|
22
|
+
import hashlib,json
|
|
23
|
+
ids={};edges=[]
|
|
24
|
+
for line in open('build/fifth-freeze/raw.txt'):
|
|
25
|
+
if not line.strip() or line[0]=='#': continue
|
|
26
|
+
a,b=line.split()[:2]
|
|
27
|
+
if a not in ids: ids[a]=len(ids)
|
|
28
|
+
if b not in ids: ids[b]=len(ids)
|
|
29
|
+
edges.append((ids[a],ids[b]))
|
|
30
|
+
assert len(ids)==262111,(len(ids),len(edges))
|
|
31
|
+
assert len(edges)==1234877,(len(ids),len(edges))
|
|
32
|
+
with open('build/fifth-freeze/amazon0302.txt','w') as f:
|
|
33
|
+
for a,b in edges:f.write(f'{a} {b}\n')
|
|
34
|
+
print('validated',len(ids),len(edges))
|
|
35
|
+
PY
|
|
36
|
+
sha256sum build/fifth-freeze/amazon0302.txt.gz build/fifth-freeze/raw.txt build/fifth-freeze/amazon0302.txt > build/fifth-freeze/checksums.txt
|
|
37
|
+
- name: Topology-only root stratification
|
|
38
|
+
run: |
|
|
39
|
+
python - <<'PY'
|
|
40
|
+
import collections,json,math
|
|
41
|
+
path='build/fifth-freeze/amazon0302.txt'
|
|
42
|
+
edges=[];n=0
|
|
43
|
+
for line in open(path):
|
|
44
|
+
u,v=map(int,line.split());edges.append((u,v));n=max(n,u+1,v+1)
|
|
45
|
+
imported=int(len(edges)*0.90)
|
|
46
|
+
adj=[[] for _ in range(n)]
|
|
47
|
+
outdeg=[0]*n
|
|
48
|
+
for u,v in edges[:imported]:adj[u].append(v);outdeg[u]+=1
|
|
49
|
+
candidates=sorted(set(round(i*(n-1)/63) for i in range(64)))
|
|
50
|
+
def reach(root):
|
|
51
|
+
seen=bytearray(n);seen[root]=1;q=collections.deque([root]);count=1
|
|
52
|
+
while q:
|
|
53
|
+
u=q.popleft()
|
|
54
|
+
for v in adj[u]:
|
|
55
|
+
if not seen[v]:seen[v]=1;count+=1;q.append(v)
|
|
56
|
+
return count/n
|
|
57
|
+
scored=[{'root':r,'reachable_fraction':reach(r),'out_degree':outdeg[r]} for r in candidates]
|
|
58
|
+
ordered=sorted(scored,key=lambda x:(x['reachable_fraction'],x['out_degree'],x['root']))
|
|
59
|
+
picks=[]
|
|
60
|
+
for idx in [0,len(ordered)//2,len(ordered)-1]:
|
|
61
|
+
r=ordered[idx]
|
|
62
|
+
if r['root'] not in [x['root'] for x in picks]:picks.append(r)
|
|
63
|
+
if len(picks)<3:
|
|
64
|
+
for r in ordered:
|
|
65
|
+
if r['root'] not in [x['root'] for x in picks]:picks.append(r)
|
|
66
|
+
if len(picks)==3:break
|
|
67
|
+
freeze={'dataset':'amazon0302','selection_uses_performance_timings':False,'vertices':n,'edges':len(edges),'import_rate':0.90,'candidate_rule':'64 evenly spaced dense IDs','root_rule':'minimum, median, maximum initial reachable fraction; out-degree then ID tie-break','roots':picks,'batch_sizes':[512,2048,8192],'repetitions':5,'acceptance':{'exact':True,'mean_regret_max':0.05,'p95_batch_regret_max':0.20,'worst_regime_regret_max':0.25,'mean_decision_us_max':1.0}}
|
|
68
|
+
print(json.dumps(freeze,indent=2))
|
|
69
|
+
open('build/fifth-freeze/freeze.json','w').write(json.dumps(freeze,indent=2)+'\n')
|
|
70
|
+
PY
|
|
71
|
+
- name: Freeze provenance
|
|
72
|
+
run: |
|
|
73
|
+
{ echo freeze_commit=$(git rev-parse HEAD); echo performance_timings_observed=false; echo prior_unseen_dataset=email-EuAll; echo fifth_dataset=amazon0302; } > build/fifth-freeze/provenance.txt
|
|
74
|
+
- uses: actions/upload-artifact@v4
|
|
75
|
+
with:
|
|
76
|
+
name: adaptive-fifth-dataset-topology-freeze
|
|
77
|
+
path: build/fifth-freeze/
|
|
78
|
+
retention-days: 90
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Adaptive BFS Policy Final Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
final-validation:
|
|
8
|
+
runs-on: ubuntu-22.04
|
|
9
|
+
timeout-minutes: 120
|
|
10
|
+
env:
|
|
11
|
+
OMP_NUM_THREADS: '1'
|
|
12
|
+
OMP_PROC_BIND: 'true'
|
|
13
|
+
SIMPLE_UPDATE_FRACTION: '0.01'
|
|
14
|
+
CANDIDATE_AFFECTED_FRACTION: '0.05'
|
|
15
|
+
EPINIONS_TEXT_SHA256: 3e42b000e66cada74053ac7f8b24de291f9837264421dc2f3730b45cc58d17b1
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.12'
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
sudo apt-get update
|
|
24
|
+
sudo apt-get install -y --no-install-recommends ninja-build
|
|
25
|
+
python -m pip install --disable-pip-version-check matplotlib
|
|
26
|
+
- name: Build five-percent candidate harness
|
|
27
|
+
run: |
|
|
28
|
+
cmake -S . -B build/vx -G Ninja -DCMAKE_BUILD_TYPE=Release -DVELOGRAPHX_BUILD_TESTS=OFF -DVELOGRAPHX_BUILD_BENCHMARKS=ON
|
|
29
|
+
cmake --build build/vx --target velographx_external_risgraph_bfs -j 2
|
|
30
|
+
mkdir -p build/final-validation
|
|
31
|
+
sed 's/policy == "always_incremental" ? 2.0 : 0.35/policy == "always_incremental" ? 2.0 : 0.05/; s/adaptive_affected_fraction\\\":0.35/adaptive_affected_fraction\\\":0.05/' benchmarks/adaptive_policy_bfs.cpp > build/final-validation/adaptive_policy_bfs.cpp
|
|
32
|
+
grep -q '2.0 : 0.05' build/final-validation/adaptive_policy_bfs.cpp
|
|
33
|
+
c++ -O3 -DNDEBUG -std=c++20 -Iinclude build/final-validation/adaptive_policy_bfs.cpp build/vx/libvelographx.a -pthread -o build/adaptive_policy_bfs_final
|
|
34
|
+
- name: Prepare pinned datasets
|
|
35
|
+
run: |
|
|
36
|
+
mkdir -p build/final-validation/datasets build/final-validation/runs build/final-validation/summary
|
|
37
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/final-validation/datasets --dataset web-Google > build/final-validation/web-source.json
|
|
38
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/final-validation/datasets --dataset ca-GrQc > build/final-validation/ca-source.json
|
|
39
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/final-validation/datasets --dataset soc-Epinions1 > build/final-validation/epinions-source.json
|
|
40
|
+
python tools/prepare_pinned_edge_stream.py --input build/final-validation/datasets/web-Google.txt --output build/final-validation/web-Google.txt --report build/final-validation/web-normalization.json --expected-sha256 8c0f453f1eb1e24ad145e36e542b129083237e96e585abae768927bdb70167d1 --expected-vertices 875713 --expected-edges 5105039
|
|
41
|
+
python tools/prepare_symmetric_pinned_edge_stream.py --input build/final-validation/datasets/ca-GrQc.txt --output build/final-validation/ca-GrQc.txt --report build/final-validation/ca-normalization.json --expected-sha256 513efa8bb5c6d3d739797ca028d4a26a7df6bc20adcf3e722e18d1bcdb0e62d5 --expected-vertices 5242 --expected-source-rows 28980 --expected-self-loops 12 --expected-nonloop-pair-multiplicity 2 --expected-unique-nonloop-pairs 14484
|
|
42
|
+
gzip -dc build/final-validation/datasets/soc-Epinions1.gz > build/final-validation/epinions-source.txt
|
|
43
|
+
test "$(sha256sum build/final-validation/epinions-source.txt | awk '{print $1}')" = "$EPINIONS_TEXT_SHA256"
|
|
44
|
+
python tools/prepare_pinned_edge_stream.py --input build/final-validation/epinions-source.txt --output build/final-validation/soc-Epinions1.txt --report build/final-validation/epinions-normalization.json --expected-sha256 "$EPINIONS_TEXT_SHA256" --expected-vertices 75879 --expected-edges 508837
|
|
45
|
+
- name: Run blind third-root regimes
|
|
46
|
+
run: |
|
|
47
|
+
python - <<'PY'
|
|
48
|
+
import json, os, subprocess
|
|
49
|
+
from pathlib import Path
|
|
50
|
+
configs = {
|
|
51
|
+
'ca-GrQc-r1974': ('ca-GrQc',1974,0.75,[96,384,1536]),
|
|
52
|
+
'soc-Epinions1-r71391': ('soc-Epinions1',71391,0.90,[384,1536,6144]),
|
|
53
|
+
'web-Google-r391806': ('web-Google',391806,0.99,[1536,6144,24576]),
|
|
54
|
+
}
|
|
55
|
+
for label,(dataset,root,rate,batches) in configs.items():
|
|
56
|
+
for batch in batches:
|
|
57
|
+
for rep in range(1,6):
|
|
58
|
+
out=Path(f'build/final-validation/runs/{label}__{batch}__{rep}.json')
|
|
59
|
+
with out.open('w') as f:
|
|
60
|
+
subprocess.run(['build/adaptive_policy_bfs_final',f'build/final-validation/{dataset}.txt',str(root),str(rate),str(batch),os.environ['SIMPLE_UPDATE_FRACTION']],stdout=f,check=True)
|
|
61
|
+
d=json.load(out.open())
|
|
62
|
+
assert d['all_policies_exact']
|
|
63
|
+
assert all(p['exact'] for p in d['policies'])
|
|
64
|
+
PY
|
|
65
|
+
- name: Summarize blind validation
|
|
66
|
+
run: |
|
|
67
|
+
python tools/summarize_adaptive_policy.py --input-dir build/final-validation/runs --output-dir build/final-validation/summary | tee build/final-validation/summary/stdout-summary.json
|
|
68
|
+
python - <<'PY'
|
|
69
|
+
import json
|
|
70
|
+
d=json.load(open('build/final-validation/summary/summary.json'))
|
|
71
|
+
assert d['all_results_exact']
|
|
72
|
+
assert len(d['datasets']) == 3
|
|
73
|
+
for name,row in d['datasets'].items(): assert row['regimes'] == 3
|
|
74
|
+
adaptive=[r for r in d['rows'] if r['policy']=='adaptive']
|
|
75
|
+
mean_relative=sum(r['relative_to_regime_best'] for r in adaptive)/len(adaptive)
|
|
76
|
+
print('adaptive_mean_relative_to_regime_best_all=',mean_relative)
|
|
77
|
+
assert mean_relative <= 1.10, mean_relative
|
|
78
|
+
assert max(r['relative_to_regime_best'] for r in adaptive) <= 1.30
|
|
79
|
+
PY
|
|
80
|
+
- name: Capture final validation pins
|
|
81
|
+
run: |
|
|
82
|
+
{
|
|
83
|
+
echo "velographx_sha=$(git rev-parse HEAD)"
|
|
84
|
+
echo "calibration_run=33311896406"
|
|
85
|
+
echo "heldout_validation_run=33312313428"
|
|
86
|
+
echo "candidate_affected_fraction=$CANDIDATE_AFFECTED_FRACTION"
|
|
87
|
+
echo "third_roots=ca-GrQc:1974,soc-Epinions1:71391,web-Google:391806"
|
|
88
|
+
echo "repetitions_per_regime=5"
|
|
89
|
+
echo "one_thread=true"
|
|
90
|
+
} > build/final-validation/pins.txt
|
|
91
|
+
- uses: actions/upload-artifact@v4
|
|
92
|
+
with:
|
|
93
|
+
name: adaptive-bfs-policy-final-validation
|
|
94
|
+
path: build/final-validation/
|
|
95
|
+
retention-days: 90
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Adaptive BFS Fourth Dataset Frozen Evaluation
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
jobs:
|
|
5
|
+
frozen-evaluation:
|
|
6
|
+
runs-on: ubuntu-22.04
|
|
7
|
+
timeout-minutes: 120
|
|
8
|
+
env: {OMP_NUM_THREADS: '1', OMP_PROC_BIND: 'true'}
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v7
|
|
11
|
+
- uses: actions/setup-python@v5
|
|
12
|
+
with: {python-version: '3.12'}
|
|
13
|
+
- name: Build frozen selector
|
|
14
|
+
run: |
|
|
15
|
+
sudo apt-get update && sudo apt-get install -y --no-install-recommends ninja-build
|
|
16
|
+
python -m pip install --disable-pip-version-check matplotlib
|
|
17
|
+
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DVELOGRAPHX_BUILD_TESTS=OFF
|
|
18
|
+
cmake --build build -j2
|
|
19
|
+
c++ -O3 -DNDEBUG -std=c++20 -Iinclude benchmarks/adaptive_policy_bfs.cpp build/libvelographx.a -pthread -o build/adaptive_policy_bfs
|
|
20
|
+
- name: Acquire unseen SNAP email-EuAll
|
|
21
|
+
run: |
|
|
22
|
+
mkdir -p build/fourth/runs build/fourth/summary
|
|
23
|
+
curl --fail --location --retry 3 https://snap.stanford.edu/data/email-EuAll.txt.gz -o build/fourth/email-EuAll.txt.gz
|
|
24
|
+
gzip -dc build/fourth/email-EuAll.txt.gz > build/fourth/raw.txt
|
|
25
|
+
python - <<'PY'
|
|
26
|
+
ids={}; edges=[]
|
|
27
|
+
for line in open('build/fourth/raw.txt'):
|
|
28
|
+
if not line.strip() or line[0]=='#': continue
|
|
29
|
+
a,b=line.split()[:2]
|
|
30
|
+
if a not in ids: ids[a]=len(ids)
|
|
31
|
+
if b not in ids: ids[b]=len(ids)
|
|
32
|
+
edges.append((ids[a],ids[b]))
|
|
33
|
+
assert len(ids)==265214 and len(edges)==420045,(len(ids),len(edges))
|
|
34
|
+
with open('build/fourth/email-EuAll.txt','w') as f:
|
|
35
|
+
for a,b in edges:f.write(f'{a} {b}\n')
|
|
36
|
+
print('vertices',len(ids),'edges',len(edges))
|
|
37
|
+
PY
|
|
38
|
+
sha256sum build/fourth/email-EuAll.txt.gz build/fourth/raw.txt build/fourth/email-EuAll.txt > build/fourth/checksums.txt
|
|
39
|
+
- name: Frozen evaluation
|
|
40
|
+
run: |
|
|
41
|
+
python - <<'PY'
|
|
42
|
+
import json,subprocess
|
|
43
|
+
from pathlib import Path
|
|
44
|
+
roots=[0,1000,10000]
|
|
45
|
+
batches=[256,1024,4096]
|
|
46
|
+
for root in roots:
|
|
47
|
+
for batch in batches:
|
|
48
|
+
for rep in range(1,6):
|
|
49
|
+
p=Path(f'build/fourth/runs/email-EuAll-r{root}__{batch}__{rep}.json')
|
|
50
|
+
with p.open('w') as f: subprocess.run(['build/adaptive_policy_bfs','build/fourth/email-EuAll.txt',str(root),'0.90',str(batch),'0.01'],stdout=f,check=True)
|
|
51
|
+
d=json.load(p.open()); assert d['all_policies_exact']
|
|
52
|
+
PY
|
|
53
|
+
- name: Publication metrics and fixed acceptance
|
|
54
|
+
run: |
|
|
55
|
+
python - <<'PY'
|
|
56
|
+
import glob,json,statistics
|
|
57
|
+
regs=[]; batch_reg=[]; matches=tot=0; decision=[]
|
|
58
|
+
for fn in glob.glob('build/fourth/runs/*.json'):
|
|
59
|
+
x=json.load(open(fn)); ps={p['name']:p for p in x['policies']}; a=ps['adaptive']; decision.append(a['mean_decision_us'])
|
|
60
|
+
totals={k:v['total_us'] for k,v in ps.items()}; best=min(totals.values()); regs.append(a['total_us']/best-1)
|
|
61
|
+
for i,v in enumerate(a['batch_us']):
|
|
62
|
+
bestb=min(p['batch_us'][i] for p in ps.values()); r=v/bestb-1;batch_reg.append(r);matches+=r<=.01;tot+=1
|
|
63
|
+
batch_reg.sort();p95=batch_reg[min(len(batch_reg)-1,int(.95*(len(batch_reg)-1)))]
|
|
64
|
+
m={'dataset':'email-EuAll','all_exact':True,'regimes':len(regs),'mean_regret':statistics.mean(regs),'p95_batch_regret':p95,'worst_regime_regret':max(regs),'oracle_match_within_1pct':matches/tot,'mean_decision_us':statistics.mean(decision),'targets':{'mean_regret':.05,'p95_batch_regret':.20,'worst_regime_regret':.25}}
|
|
65
|
+
print(json.dumps(m,indent=2));open('build/fourth/summary/paper-metrics.json','w').write(json.dumps(m,indent=2)+'\n')
|
|
66
|
+
assert m['mean_regret']<=.05,m
|
|
67
|
+
assert m['p95_batch_regret']<=.20,m
|
|
68
|
+
assert m['worst_regime_regret']<=.25,m
|
|
69
|
+
PY
|
|
70
|
+
- name: Freeze provenance
|
|
71
|
+
if: always()
|
|
72
|
+
run: |
|
|
73
|
+
{ echo selector_commit=$(git rev-parse HEAD); echo dataset=email-EuAll; echo expected_vertices=265214; echo expected_edges=420045; echo roots=0,1000,10000; echo batches=256,1024,4096; echo repetitions=5; echo targets=mean5%,p95-20%,worst25%; } > build/fourth/provenance.txt
|
|
74
|
+
- uses: actions/upload-artifact@v4
|
|
75
|
+
if: always()
|
|
76
|
+
with: {name: adaptive-fourth-dataset-frozen, path: build/fourth/, retention-days: 90}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Adaptive BFS Policy Held-out Final
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
jobs:
|
|
5
|
+
heldout:
|
|
6
|
+
runs-on: ubuntu-22.04
|
|
7
|
+
timeout-minutes: 120
|
|
8
|
+
env:
|
|
9
|
+
OMP_NUM_THREADS: '1'
|
|
10
|
+
OMP_PROC_BIND: 'true'
|
|
11
|
+
SIMPLE_UPDATE_FRACTION: '0.01'
|
|
12
|
+
EPINIONS_TEXT_SHA256: 3e42b000e66cada74053ac7f8b24de291f9837264421dc2f3730b45cc58d17b1
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with: {python-version: '3.12'}
|
|
17
|
+
- name: Dependencies and build
|
|
18
|
+
run: |
|
|
19
|
+
sudo apt-get update && sudo apt-get install -y --no-install-recommends ninja-build
|
|
20
|
+
python -m pip install --disable-pip-version-check matplotlib
|
|
21
|
+
cmake -S . -B build/vx -G Ninja -DCMAKE_BUILD_TYPE=Release -DVELOGRAPHX_BUILD_TESTS=OFF -DVELOGRAPHX_BUILD_BENCHMARKS=ON
|
|
22
|
+
cmake --build build/vx --target velographx_external_risgraph_bfs -j 2
|
|
23
|
+
c++ -O3 -DNDEBUG -std=c++20 -Iinclude benchmarks/adaptive_policy_bfs.cpp build/vx/libvelographx.a -pthread -o build/adaptive_policy_bfs
|
|
24
|
+
- name: Prepare pinned datasets
|
|
25
|
+
run: |
|
|
26
|
+
mkdir -p build/heldout/datasets build/heldout/runs build/heldout/summary
|
|
27
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/heldout/datasets --dataset web-Google >/dev/null
|
|
28
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/heldout/datasets --dataset ca-GrQc >/dev/null
|
|
29
|
+
python tools/prepare_dataset.py --manifest datasets/manifest.public-small.json --output-dir build/heldout/datasets --dataset soc-Epinions1 >/dev/null
|
|
30
|
+
python tools/prepare_pinned_edge_stream.py --input build/heldout/datasets/web-Google.txt --output build/heldout/web-Google.txt --report build/heldout/web.json --expected-sha256 8c0f453f1eb1e24ad145e36e542b129083237e96e585abae768927bdb70167d1 --expected-vertices 875713 --expected-edges 5105039 >/dev/null
|
|
31
|
+
python tools/prepare_symmetric_pinned_edge_stream.py --input build/heldout/datasets/ca-GrQc.txt --output build/heldout/ca-GrQc.txt --report build/heldout/ca.json --expected-sha256 513efa8bb5c6d3d739797ca028d4a26a7df6bc20adcf3e722e18d1bcdb0e62d5 --expected-vertices 5242 --expected-source-rows 28980 --expected-self-loops 12 --expected-nonloop-pair-multiplicity 2 --expected-unique-nonloop-pairs 14484 >/dev/null
|
|
32
|
+
gzip -dc build/heldout/datasets/soc-Epinions1.gz > build/heldout/ep.txt
|
|
33
|
+
test "$(sha256sum build/heldout/ep.txt | awk '{print $1}')" = "$EPINIONS_TEXT_SHA256"
|
|
34
|
+
python tools/prepare_pinned_edge_stream.py --input build/heldout/ep.txt --output build/heldout/soc-Epinions1.txt --report build/heldout/ep.json --expected-sha256 "$EPINIONS_TEXT_SHA256" --expected-vertices 75879 --expected-edges 508837 >/dev/null
|
|
35
|
+
- name: Frozen unseen roots and update sizes
|
|
36
|
+
run: |
|
|
37
|
+
python - <<'PY'
|
|
38
|
+
import json,os,subprocess
|
|
39
|
+
from pathlib import Path
|
|
40
|
+
configs=[
|
|
41
|
+
('ca-GrQc',0.75,[364,1236,2108],[160,640,1280]),
|
|
42
|
+
('soc-Epinions1',0.90,[18,737,1719],[640,2560,5120]),
|
|
43
|
+
('web-Google',0.99,[0,2,5],[2560,8192,16384]),
|
|
44
|
+
]
|
|
45
|
+
for ds,rate,roots,batches in configs:
|
|
46
|
+
for root in roots:
|
|
47
|
+
for batch in batches:
|
|
48
|
+
for rep in range(1,6):
|
|
49
|
+
out=Path(f'build/heldout/runs/{ds}-r{root}__{batch}__{rep}.json')
|
|
50
|
+
with out.open('w') as f: subprocess.run(['build/adaptive_policy_bfs',f'build/heldout/{ds}.txt',str(root),str(rate),str(batch),os.environ['SIMPLE_UPDATE_FRACTION']],stdout=f,check=True)
|
|
51
|
+
d=json.load(out.open()); assert d['all_policies_exact']; assert all(p['exact'] for p in d['policies'])
|
|
52
|
+
PY
|
|
53
|
+
- name: Regret, oracle match, overhead and crossover
|
|
54
|
+
run: |
|
|
55
|
+
python tools/summarize_adaptive_policy.py --input-dir build/heldout/runs --output-dir build/heldout/summary > build/heldout/summary/stdout.json
|
|
56
|
+
python - <<'PY'
|
|
57
|
+
import glob,json,statistics
|
|
58
|
+
d=json.load(open('build/heldout/summary/summary.json')); assert d['all_results_exact']
|
|
59
|
+
a=[r for r in d['rows'] if r['policy']=='adaptive']; rel=[r['relative_to_regime_best']-1 for r in a]
|
|
60
|
+
batch_regrets=[]; matches=total=0; overhead=[]
|
|
61
|
+
for fn in glob.glob('build/heldout/runs/*.json'):
|
|
62
|
+
x=json.load(open(fn)); ps={p['name']:p for p in x['policies']}; ad=ps['adaptive']['batch_us']; inc=ps['always_incremental']['batch_us']; full=ps['always_full']['batch_us']; simple=ps['simple_threshold']['batch_us']
|
|
63
|
+
for i,v in enumerate(ad):
|
|
64
|
+
best=min(inc[i],full[i],simple[i]); batch_regrets.append((v-best)/best); matches += v <= best*1.01; total+=1
|
|
65
|
+
overhead.append(max(0.0,v-min(inc[i],full[i])))
|
|
66
|
+
batch_regrets.sort(); p95=batch_regrets[min(len(batch_regrets)-1,int(.95*(len(batch_regrets)-1)))]
|
|
67
|
+
summary={'all_exact':True,'regimes':len(a),'mean_regret_vs_best_policy':statistics.mean(rel),'p95_batch_regret':p95,'worst_regime_regret':max(rel),'oracle_decision_match_within_1pct':matches/total,'mean_adaptive_excess_us_vs_best_inc_full':statistics.mean(overhead),'crossovers':d['datasets']}
|
|
68
|
+
print(json.dumps(summary,indent=2)); open('build/heldout/summary/paper-metrics.json','w').write(json.dumps(summary,indent=2)+'\n')
|
|
69
|
+
assert summary['mean_regret_vs_best_policy'] <= .05, summary
|
|
70
|
+
assert summary['worst_regime_regret'] <= .25, summary
|
|
71
|
+
PY
|
|
72
|
+
- name: Immutable pins
|
|
73
|
+
if: always()
|
|
74
|
+
run: |
|
|
75
|
+
{ echo "sha=$(git rev-parse HEAD)"; echo "heldout_roots=ca:364,1236,2108;ep:18,737,1719;web:0,2,5"; echo "heldout_batches=ca:160,640,1280;ep:640,2560,5120;web:2560,8192,16384"; echo "repetitions=5"; } > build/heldout/pins.txt
|
|
76
|
+
- uses: actions/upload-artifact@v4
|
|
77
|
+
if: always()
|
|
78
|
+
with:
|
|
79
|
+
name: adaptive-policy-heldout-final
|
|
80
|
+
path: build/heldout/
|
|
81
|
+
retention-days: 90
|