hypertopos 0.9.2__tar.gz → 0.9.3__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.
- {hypertopos-0.9.2 → hypertopos-0.9.3}/CHANGELOG.md +17 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/LICENSE.md +1 -1
- {hypertopos-0.9.2 → hypertopos-0.9.3}/PKG-INFO +4 -7
- {hypertopos-0.9.2 → hypertopos-0.9.3}/README.md +3 -6
- {hypertopos-0.9.2 → hypertopos-0.9.3}/SECURITY.md +1 -1
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/examples/spark-quickstart.ipynb +2 -7
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/spark.md +32 -6
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/__init__.py +1 -1
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/spark_cmd.py +48 -4
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/scoring.py +2 -2
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_api.py +21 -11
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_build.py +8 -3
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_explain.py +49 -7
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_plan.py +5 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_score.py +11 -3
- {hypertopos-0.9.2 → hypertopos-0.9.3}/pyproject.toml +1 -1
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_spark.py +58 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_scoring.py +12 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_connect_safe.py +66 -1
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_score.py +40 -2
- {hypertopos-0.9.2 → hypertopos-0.9.3}/.github/workflows/publish-pypi.yml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/.github/workflows/test.yml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/.gitignore +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/api-reference.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/architecture.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/LICENSE +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/SUMMARY.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r1/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r1/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r1/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r1/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r1/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r2/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r2/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r2/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r2/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r2/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r3/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r3/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r3/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r3/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r3/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r4/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r4/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r4/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r4/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r4/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r5/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r5/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r5/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r5/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r5/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r6/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r6/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r6/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r6/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/results/0.1.0/r6/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_accounts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_cpty_banks.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_districts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_loan_accounts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_operations.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_orders.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_transactions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/prepare_tx_types.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/berka/sphere/sphere.yaml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/_layer2_cross_eval.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/_layer3_cross_eval.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/hi_small_sphere/prepare_accounts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/hi_small_sphere/prepare_currencies.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/hi_small_sphere/prepare_payment_formats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/hi_small_sphere/prepare_transactions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/hi_small_sphere/sphere.yaml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/layer1_passive_scan.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/layer2_xgboost_sweep.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/layer3_typology_filter.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/li_small_sphere/prepare_accounts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/li_small_sphere/prepare_currencies.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/li_small_sphere/prepare_payment_formats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/li_small_sphere/prepare_transactions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/li_small_sphere/sphere.yaml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/ibm-aml/passive-scan-calibration.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/SUMMARY.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-exp-c-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r1/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-exp-c-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r2/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-exp-a-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-exp-a-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-exp-b-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-exp-b-scoring.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-exp-c-report.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/results/0.1.0/r3/0.1.0-settings.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/sphere/prepare_trips.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmark/nyc-taxi/sphere/sphere.yaml +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/benchmarks.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/concepts.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/configuration.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/container-deployment.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/data-format.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/external-chains-as-anchor-line.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/build-pipeline.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/core-objects.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/cutting-plane.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/demo-drift-solid.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/demo-find-anomalies.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/demo-spark.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/directory-layout.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/hypertopos-overview.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/model-lifecycle.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/navigation-primitives.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/sessions-and-branches.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/images/three-scales.svg +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/introduction.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/quickstart.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/docs/refutations.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/_file_formats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_bootstrap.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_bregman.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_scatter.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_stats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_theta_sensitivity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/_writer.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/builder.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/conformance.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/conformance_mapping.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/derived.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/dim_blocks.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/mapping.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/builder/temporal_bucket.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/__main__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/build.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/info.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/main.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/schema.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/sources.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/cli/sphere_ops.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/datasets.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/adjacency.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/aggregation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/calibration.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/calibration_label_aware.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/chains.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/composition.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/conformance.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/counterfactual.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/density_gaps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/diagnostics.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/dim_audit.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/edge_features.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/explanation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/fdr.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/forecast.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/geometry.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/graph.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/graph_algorithms.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/heredity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/hop_predicate.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/invalidation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/investigation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/lance_sql_agg.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/p_value_calibration.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/selection.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/structuring.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/engine/topology.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/model/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/model/manifest.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/model/objects.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/model/sphere.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/navigation/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/navigation/navigator.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/navigation/scanner.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/py.typed +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/spark/_result.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/sphere.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/_lance_branches.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/_lance_session.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/_lance_versions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/_schemas.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/_tag_timestamps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/calibration_history.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/exceptions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/reader.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/topology_cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/storage/writer.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/utils/__init__.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/utils/arrow.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/utils/gc_pause.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/hypertopos/utils/time.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/.gitkeep +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/_golden_py.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/conftest.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/fixtures/generate_fixtures.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/fixtures/synthetic_chain_sphere.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/README.md +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_aggregate.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_attract_anomaly_accounts.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_attract_anomaly_transactions.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_attract_drift.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_calibration.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_check_alerts.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_explain_anomaly.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/built_sphere_overview.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/chain_coherent_anomaly.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/chain_for_entity.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/chain_propagation_and_typology.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/extract_chains_engine.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/sales_calibration_and_anomaly.json +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/golden/spark_plan_full.txt +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_adjacency.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_adjacency_order.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_adjacency_vectorized.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_aggregate_group_by_relation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_aggregate_tie_order.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_aggregation_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_anomaly_influence_cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_anomaly_propagation_in_chain.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_arrow_utils.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_atomic_meta_writes.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_audit_label_alignment.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_bootstrap.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_branch_ingest.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_branch_recalibrate.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_branch_sessions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_branches.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_bregman.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_alias.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_chunking.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_contagion.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_derived.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_edges.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_fdr_hierarchy.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_fdr_hierarchy_inject.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_fdr_yaml_end_to_end.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_rolling_z.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_scatter.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_temporal_bucket.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_builder_temporal_perf.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cache_threads.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration_drift.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration_history.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration_history_builder.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration_history_reader.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_calibration_label_aware.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_centroid_drift_labels.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_coherent_anomaly.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_coherent_synthetic.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_drift_trajectory.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_edge_potentials.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_extraction_parity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_investigation_summary.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_signed_confidence_rollup.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_typology_and_extend.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chain_witness_intersection.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_chains.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_alias.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_branch.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_inprocess.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_label_aware_flag.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_mcp_contract.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_sources.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cli_subprocess.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cluster_a_label_aware_depth.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cluster_c1_sphere_overview_ergonomics.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cluster_c3_detector_closures.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cluster_d1_graph_phase3.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_cluster_d2_influencer_auto_discovery.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_compaction.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_compare_branches.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_composition.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_conformance.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_conformance_before_write.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_conformance_mapping.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_conftest_magicmock_restore.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_continuous_event_dims.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_count_geometry_rows_missing.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_counterfactual.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_counterfactual_frozen_trajectory.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_counterfactual_metric.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_data_quality_prop.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_datasets.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_decompose_drift.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_delta_dim_aggregation_consumers.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_delta_norm_signed.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_density_gaps_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_derived_std_exact.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_detection.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_diagnostics.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_dim_audit.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_dim_blocks.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_dim_blocks_build.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_dim_quality_warnings.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_distinct_neighbor_count.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations_builder.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations_chain.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations_parity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dim_aggregations_roundtrip.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dimensions_builder.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_dimensions_yaml.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_features.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_features_pairs.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_features_reader.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_potential.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_edge_table.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_epoch_seconds.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_fdr.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_fdr_multi_resolution.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_fdr_non_finite.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_fdr_per_dim.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_file_formats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_calibration_influencers.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_density_gaps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_diverse_explanations.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_lead_lag.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_lead_lag_significance.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_find_motif_by_hops.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_forecast.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_fts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_generate_sar_rationale.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_geometric_path.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_geometry_stats.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_golden_core.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_goto_keyed_read.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_gradient_alignment.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_graph_algorithms.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_graph_communities_deterministic.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_graph_components.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_graph_edge_arrays.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_graph_geometry_tension.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_group_aggregate.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_heredity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hop_predicate_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hub_safety_caps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hunt3_branches_sessions.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hunt3_builder_cli.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hunt3_navigator.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_hybrid_search.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_incremental.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_invalidation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_investigate_chain.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_investigate_entity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_investigation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_kind_detect.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_kind_tag_mismatch_warning.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_label_audit_schema.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_lance_session.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_lance_sql_agg.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_lance_sql_pinned_version.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_lance_write_policy.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_local_trajectory_shape.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_m1_1_builder_wiring.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_mapping.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_metric_arithmetic_guard.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_model.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_motif.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_mvcc_session.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_native_mvcc_geometry.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_navigation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_navigator_alerts.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_navigator_extract_chains.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_navigator_fdr_resolution.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_navigator_fdr_select.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_neighbors_window.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_no_global_rng.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_observability.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_p_value_calibration.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_pattern_fdr_hierarchy.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_perf_budget.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_points_btree_lazy.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_precision_stack.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_precomputed_dim_kind.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_profile_motif_perf_smoke.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_promote_branch.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_query_determinism.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_rank_stats_rewrite.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_reader_pinned_open.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_reader_quoted_literals.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_reader_sampling.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_recalibrate_column_write.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_recalibrate_derived_columns.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_recalibrate_epochs.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_reliability_flags.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_reputation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_root_cause_trace.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_row_id_cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_scanner.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_scanner_order.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_scatter_columns.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_schema_chain_eda_validation.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_schema_mahalanobis_group_by.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_schema_mahalanobis_weights.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_seed_scoped_motif.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_selection.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_session_metadata_pin.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_session_ref_ratchet.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_shapes_from_deltas.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_short_path_epoch_tag.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_signed_confidence_ranking.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_simulate_dimension_change.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_slice_deltas.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_smoke_round_navigator.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_build.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_docs.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_explain.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_find_anomalies.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_plan.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_spark_quickstart.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_sphere.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_sphere_format_version.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_sphere_overview_perf.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_sphere_validation_cheap_tier.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_stats_guard.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_storage.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_stored_delta_metric.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_streaming_reads.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_structuring_engine.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_tag_timestamps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_temporal_bucket_median.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_temporal_centroids.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_temporal_filter_offsets.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_temporal_timestamps.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_theta_sensitivity.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_time_utils.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_topology.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_topology_anomalies.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_topology_cache.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_topology_trajectory_anomalies.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_trajectory_active_windows.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_trajectory_ann.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_trajectory_detector.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_vector_index_health.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_witness_cohort.py +0 -0
- {hypertopos-0.9.2 → hypertopos-0.9.3}/tests/test_witness_set.py +0 -0
|
@@ -7,6 +7,23 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.3] — 2026-10-26
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `hypertopos spark score --input ... --calibration PATH` scores new events against a saved calibration from the command line or a Databricks Python wheel task, with `--anomalies-only` and `--append` for a daily alerts table; `hypertopos spark find-anomalies` prints the path of its calibration.
|
|
15
|
+
- `explain` works on a `score` result: `explain(today, events=new_events)` recomputes the dimensions of the explained entities from the events they were scored on and compares them with the frozen population; a `score` result now points to its calibration, so `sphere_of(today)` returns it.
|
|
16
|
+
- `hypertopos.spark.sphere_of(path)` opens a saved calibration by its path, so a scheduled job in a new process can score new events against an earlier baseline with `score(df, like=sphere_of(path))`; the Spark docs show the calibrate-once, score-daily recipe on a Unity Catalog Volume.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The README states the license terms plainly: production use is allowed, offering hypertopos to third parties as a hosted or embedded competing service is not, and each version becomes Apache 2.0 three years after its release.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `p_value` and `rank_pct` in Spark results and `FrozenCalibration` scores are exact ratios of counts (`0.001`, not `0.0010000000474974513`).
|
|
25
|
+
- `find_anomalies` counts the entities from the keys alone and runs the full per-entity aggregation once, instead of three times, on compute that cannot cache a DataFrame (Databricks serverless), so a call there takes a fraction of the time it did.
|
|
26
|
+
|
|
10
27
|
## [0.9.2] — 2026-10-25
|
|
11
28
|
|
|
12
29
|
### Added
|
|
@@ -26,7 +26,7 @@ For purposes of this License:
|
|
|
26
26
|
- **Internal use** within an organization is not a competitive offering. Your
|
|
27
27
|
organization includes entities under common control.
|
|
28
28
|
|
|
29
|
-
**Change Date:** 2029-10-
|
|
29
|
+
**Change Date:** 2029-10-26
|
|
30
30
|
|
|
31
31
|
**Change License:** Apache License, Version 2.0
|
|
32
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: hypertopos
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: Understand the structure of your data — without training machine learning models
|
|
5
5
|
Project-URL: Homepage, https://github.com/hypertopos/hypertopos-py
|
|
6
6
|
Project-URL: Documentation, https://github.com/hypertopos/hypertopos-py/tree/main/docs
|
|
@@ -61,7 +61,7 @@ Description-Content-Type: text/markdown
|
|
|
61
61
|
[](https://arrow.apache.org/docs/python/)
|
|
62
62
|
[](https://github.com/lance-format/lance)
|
|
63
63
|
[](https://modelcontextprotocol.io)
|
|
64
|
-
[](pyproject.toml)
|
|
65
65
|
|
|
66
66
|
Describe your tables in a YAML file, run `hypertopos build`, and every entity gets a position relative to its own population — so "out of place", "similar", "drifting" and "different between groups" become distances you read instead of queries you write.
|
|
67
67
|
|
|
@@ -216,9 +216,6 @@ Real output (local Spark, two cores):
|
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
`A000335` made 20 payments on its busiest day, against about 8 for retail accounts (+5.3 σ), and its payment amounts vary far more than theirs (`amount_std_out` is log-scaled). In the labels of `data.accounts` it is one of the planted fan-out accounts. The other two are not laundering, only unusual, which is what a distance from the population measures: `p_value` 0.001 means one entity in a thousand is as far out. The labels let you measure how a detector does on the same data. `explain` shows where every number comes from. `score(new_events, like=result)` scores the next batch against this calibration on the executors, and `sphere_of(result)` hands the same geometry to an agent through the MCP server.
|
|
219
|
-
> [!TIP]
|
|
220
|
-
> On a laptop, create the session with `.master("local[2]").config("spark.sql.shuffle.partitions", "4")`. The default of 200 shuffle partitions is sized for a cluster.
|
|
221
|
-
|
|
222
219
|
Everything else, from column roles and the 23 dimensions to time handling, the cache and the CLI, is in [hypertopos on Spark](docs/spark.md). To run the whole flow on labelled synthetic data, open the [quickstart notebook](docs/examples/spark-quickstart.ipynb) on Databricks or locally.
|
|
223
220
|
|
|
224
221
|
## See it in action
|
|
@@ -423,7 +420,7 @@ Every capability below comes from one decision: an entity is a point in a space
|
|
|
423
420
|
| Operations CLI | `hypertopos sphere health`, `validate` and `diff` give CI gates and drift between two builds; vector-index health is reported before trajectory tools rely on it | Hand-rolled validation scripts |
|
|
424
421
|
| An agent surface | The MCP server runs over stdio or HTTP with a session per agent and compact, strict-JSON responses sized for a context window | Wrapping a database in ad-hoc tools |
|
|
425
422
|
| On Spark | `hypertopos.spark.find_anomalies(df, entity=…, …)` aggregates events per entity on the executors and returns a DataFrame with distance, flag, p-value and reasons; `explain` breaks it down, `sphere_of` hands it to an agent. Runs on classic clusters and Spark Connect, including Databricks serverless | Exporting events, building features by hand and running a detector outside the cluster |
|
|
426
|
-
| Frozen scoring | `FrozenCalibration` (and `hypertopos.spark.score` on executors) scores new data against a fixed population without recalibrating | Refitting the detector on every batch, so yesterday's and today's scores are not comparable |
|
|
423
|
+
| Frozen scoring | `FrozenCalibration` (and `hypertopos.spark.score` on executors) scores new data against a fixed population without recalibrating; a calibration saved on persistent storage serves later scheduled jobs (`sphere_of(path)`, `hypertopos spark score`), and `explain` names the dimensions behind each alert | Refitting the detector on every batch, so yesterday's and today's scores are not comparable |
|
|
427
424
|
| Data to try it on | `hypertopos.datasets.synthetic_aml` generates a labelled payments dataset with six laundering patterns | Hunting for a public dataset before the first call |
|
|
428
425
|
|
|
429
426
|
### What changes in practice
|
|
@@ -508,4 +505,4 @@ Research-stage project. Working code, reproducible benchmarks, active developmen
|
|
|
508
505
|
|
|
509
506
|
## License
|
|
510
507
|
|
|
511
|
-
[Business Source License 1.1](LICENSE.md).
|
|
508
|
+
[Business Source License 1.1](LICENSE.md). You may use hypertopos in production, including on your own data platform; you may not offer it to third parties as a hosted or embedded competing service. Each version becomes Apache 2.0 three years after its release. See LICENSE.md for the exact terms.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://arrow.apache.org/docs/python/)
|
|
10
10
|
[](https://github.com/lance-format/lance)
|
|
11
11
|
[](https://modelcontextprotocol.io)
|
|
12
|
-
[](pyproject.toml)
|
|
13
13
|
|
|
14
14
|
Describe your tables in a YAML file, run `hypertopos build`, and every entity gets a position relative to its own population — so "out of place", "similar", "drifting" and "different between groups" become distances you read instead of queries you write.
|
|
15
15
|
|
|
@@ -164,9 +164,6 @@ Real output (local Spark, two cores):
|
|
|
164
164
|
```
|
|
165
165
|
|
|
166
166
|
`A000335` made 20 payments on its busiest day, against about 8 for retail accounts (+5.3 σ), and its payment amounts vary far more than theirs (`amount_std_out` is log-scaled). In the labels of `data.accounts` it is one of the planted fan-out accounts. The other two are not laundering, only unusual, which is what a distance from the population measures: `p_value` 0.001 means one entity in a thousand is as far out. The labels let you measure how a detector does on the same data. `explain` shows where every number comes from. `score(new_events, like=result)` scores the next batch against this calibration on the executors, and `sphere_of(result)` hands the same geometry to an agent through the MCP server.
|
|
167
|
-
> [!TIP]
|
|
168
|
-
> On a laptop, create the session with `.master("local[2]").config("spark.sql.shuffle.partitions", "4")`. The default of 200 shuffle partitions is sized for a cluster.
|
|
169
|
-
|
|
170
167
|
Everything else, from column roles and the 23 dimensions to time handling, the cache and the CLI, is in [hypertopos on Spark](docs/spark.md). To run the whole flow on labelled synthetic data, open the [quickstart notebook](docs/examples/spark-quickstart.ipynb) on Databricks or locally.
|
|
171
168
|
|
|
172
169
|
## See it in action
|
|
@@ -371,7 +368,7 @@ Every capability below comes from one decision: an entity is a point in a space
|
|
|
371
368
|
| Operations CLI | `hypertopos sphere health`, `validate` and `diff` give CI gates and drift between two builds; vector-index health is reported before trajectory tools rely on it | Hand-rolled validation scripts |
|
|
372
369
|
| An agent surface | The MCP server runs over stdio or HTTP with a session per agent and compact, strict-JSON responses sized for a context window | Wrapping a database in ad-hoc tools |
|
|
373
370
|
| On Spark | `hypertopos.spark.find_anomalies(df, entity=…, …)` aggregates events per entity on the executors and returns a DataFrame with distance, flag, p-value and reasons; `explain` breaks it down, `sphere_of` hands it to an agent. Runs on classic clusters and Spark Connect, including Databricks serverless | Exporting events, building features by hand and running a detector outside the cluster |
|
|
374
|
-
| Frozen scoring | `FrozenCalibration` (and `hypertopos.spark.score` on executors) scores new data against a fixed population without recalibrating | Refitting the detector on every batch, so yesterday's and today's scores are not comparable |
|
|
371
|
+
| Frozen scoring | `FrozenCalibration` (and `hypertopos.spark.score` on executors) scores new data against a fixed population without recalibrating; a calibration saved on persistent storage serves later scheduled jobs (`sphere_of(path)`, `hypertopos spark score`), and `explain` names the dimensions behind each alert | Refitting the detector on every batch, so yesterday's and today's scores are not comparable |
|
|
375
372
|
| Data to try it on | `hypertopos.datasets.synthetic_aml` generates a labelled payments dataset with six laundering patterns | Hunting for a public dataset before the first call |
|
|
376
373
|
|
|
377
374
|
### What changes in practice
|
|
@@ -456,4 +453,4 @@ Research-stage project. Working code, reproducible benchmarks, active developmen
|
|
|
456
453
|
|
|
457
454
|
## License
|
|
458
455
|
|
|
459
|
-
[Business Source License 1.1](LICENSE.md).
|
|
456
|
+
[Business Source License 1.1](LICENSE.md). You may use hypertopos in production, including on your own data platform; you may not offer it to third parties as a hosted or embedded competing service. Each version becomes Apache 2.0 three years after its release. See LICENSE.md for the exact terms.
|
|
@@ -35,16 +35,11 @@
|
|
|
35
35
|
"metadata": {},
|
|
36
36
|
"outputs": [],
|
|
37
37
|
"source": [
|
|
38
|
-
"# On Databricks `spark` already exists
|
|
39
|
-
"# few shuffle partitions, because the default of 200 is sized for a cluster.\n",
|
|
38
|
+
"# On Databricks `spark` already exists; elsewhere, start a session.\n",
|
|
40
39
|
"if \"spark\" not in globals():\n",
|
|
41
40
|
" from pyspark.sql import SparkSession\n",
|
|
42
41
|
"\n",
|
|
43
|
-
" spark = (
|
|
44
|
-
" SparkSession.builder.master(\"local[2]\")\n",
|
|
45
|
-
" .config(\"spark.sql.shuffle.partitions\", \"4\")\n",
|
|
46
|
-
" .getOrCreate()\n",
|
|
47
|
-
" )"
|
|
42
|
+
" spark = SparkSession.builder.getOrCreate()"
|
|
48
43
|
]
|
|
49
44
|
},
|
|
50
45
|
{
|
|
@@ -10,13 +10,13 @@ In a notebook, `help(find_anomalies)` prints the full parameter list.
|
|
|
10
10
|
pip install "hypertopos[spark]"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The extra pulls in `pyspark>=3.5,<5`, plus `setuptools` on Python 3.12+ because PySpark 3.5 imports `distutils`. On Databricks, PySpark is already present: `%pip install hypertopos` is enough. hypertopos needs Python 3.12, so on Databricks use Runtime 16 or later, or serverless environment version 3 or later.
|
|
13
|
+
The extra pulls in `pyspark>=3.5,<5`, plus `setuptools` on Python 3.12+ because PySpark 3.5 imports `distutils`. On Databricks, PySpark is already present: `%pip install hypertopos` is enough. hypertopos needs Python 3.12, so on Databricks use Runtime 16 or later, or serverless environment version 3 or later. It is verified on Databricks serverless (a Spark Connect session) and on classic local Spark sessions; on Databricks, classic clusters run the same classic code path.
|
|
14
14
|
|
|
15
15
|
> [!NOTE]
|
|
16
16
|
> `No matching distribution found for hypertopos`, with versions ignored for `Requires-Python >=3.12`, means the compute runs an older Python, not that the package is missing. In a serverless notebook, open the **Environment** side panel and pick environment version 3 or later. In a job, set `environment_version` to 3 or later in the task's environment spec. A job task without an environment spec can still start on an older default version.
|
|
17
17
|
|
|
18
18
|
> [!TIP]
|
|
19
|
-
> PySpark needs a JVM (Java 11 or 17 for Spark 3.5). Locally, set `PYSPARK_PYTHON` to the interpreter that has hypertopos installed. Otherwise the Python workers start from a different environment.
|
|
19
|
+
> PySpark needs a JVM (Java 11 or 17 for Spark 3.5). Locally, set `PYSPARK_PYTHON` to the interpreter that has hypertopos installed. Otherwise the Python workers start from a different environment.
|
|
20
20
|
|
|
21
21
|
## Try it on synthetic data
|
|
22
22
|
|
|
@@ -129,11 +129,29 @@ today = score(spark.table("main.aml.transactions_today"), like=result)
|
|
|
129
129
|
today.where("is_anomaly").write.mode("append").saveAsTable("main.aml.daily_alerts")
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
It returns the same columns as `find_anomalies`. The aggregation and the scoring both run on the executors, and only the calibration travels with the tasks (the per-dimension statistics plus the population's sorted distances, about 4 MB per million calibrated entities), so the new data never reaches the driver. Nothing is recalibrated: `p_value` and `rank_pct` place each entity within the original population. With `group_by`, an entity whose group did not exist at calibration time is scored against the whole population, with `calibration_scope` set to `global`. `like` accepts the result or its `sphere_of(result)`.
|
|
132
|
+
It returns the same columns as `find_anomalies`. The aggregation and the scoring both run on the executors, and only the calibration travels with the tasks (the per-dimension statistics plus the population's sorted distances, about 4 MB per million calibrated entities), so the new data never reaches the driver. Nothing is recalibrated: `p_value` and `rank_pct` place each entity within the original population. With `group_by`, an entity whose group did not exist at calibration time is scored against the whole population, with `calibration_scope` set to `global`. `like` accepts the result or its `sphere_of(result)`. To see why a scored entity stands out, pass the events it was scored on: `explain(today, events=new_events)`. Its entities are not in the calibration, so `explain` recomputes their dimensions from their own events, on the executors, and compares them with the frozen population.
|
|
133
|
+
|
|
134
|
+
#### In a scheduled job
|
|
135
|
+
|
|
136
|
+
A daily job runs in a new process, so the result of the calibration run is gone. Keep the calibration on persistent storage and score against it by its path:
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
# Once, or whenever the baseline should move: calibrate on a reference window.
|
|
140
|
+
reference = spark.table("main.aml.transactions").where("ts < '2026-10-01'")
|
|
141
|
+
result = find_anomalies(reference, entity="from_account", counterparty="to_account",
|
|
142
|
+
amount="amount", time="ts", sphere_root="/Volumes/main/aml/hypertopos")
|
|
143
|
+
calibration_path = str(sphere_of(result).path) # keep it, e.g. as a job parameter
|
|
144
|
+
|
|
145
|
+
# Every day: score the new events against that baseline and append the alerts.
|
|
146
|
+
today = score(spark.table("main.aml.transactions_today"), like=sphere_of(calibration_path))
|
|
147
|
+
today.where("is_anomaly").write.mode("append").saveAsTable("main.aml.daily_alerts")
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The baseline stays the same from one day to the next, so the scores stay comparable; it moves only when you run the calibration again. On a Databricks Volume, the entity table and the calibration are written as plain files, which a Volume accepts.
|
|
133
151
|
|
|
134
152
|
### Per-group populations
|
|
135
153
|
|
|
136
|
-
`group_by` names an entity property, such as a segment or a country. Each group gets its own population, so a large business account is compared with businesses, not with retail customers:
|
|
154
|
+
`group_by` names an entity property, such as a segment or a country. Each group gets its own population, so a large business account is compared with businesses, not with retail customers. Use it whenever the entities differ in kind or scale (retail and business accounts, small and large merchants): without it, the largest entities stand out for being large, and the unusual behaviour inside each kind is diluted:
|
|
137
155
|
|
|
138
156
|
```python
|
|
139
157
|
find_anomalies(tx, entity="from_account", counterparty="to_account", amount="amount",
|
|
@@ -154,7 +172,7 @@ The entity table and its calibration are stored under `sphere_root`. The default
|
|
|
154
172
|
- **A DataFrame built in memory** is reused only as the same object. A re-created frame always recalibrates.
|
|
155
173
|
- **A plain file rewritten in place under the same name** is not detected. Pass `cache=False` to force a fresh calibration.
|
|
156
174
|
|
|
157
|
-
The driver temp directory does not survive a cluster restart. Set `sphere_root` to a persistent location to keep calibrations.
|
|
175
|
+
The driver temp directory does not survive a cluster restart. Set `sphere_root` to a persistent location, such as a Unity Catalog Volume, to keep calibrations. On serverless compute a custom Spark conf cannot be set, so pass `sphere_root=` or set `HYPERTOPOS_SPHERE_ROOT`.
|
|
158
176
|
|
|
159
177
|
> [!TIP]
|
|
160
178
|
> The driver holds the per-entity table, its calibration and the result. With all dimensions, the calibration step alone takes under 1 GB per million entities, and the whole call takes several times that, so size the driver at a few GB per million entities. `max_entities` (5 million by default) stops a larger run with a clear error before it starts; raise it on a bigger driver.
|
|
@@ -172,6 +190,14 @@ hypertopos spark find-anomalies --input main.aml.transactions --entity from_acco
|
|
|
172
190
|
|
|
173
191
|
`--input` takes a Parquet or CSV file or directory, a Delta directory, or a table or view name. Exactly one of `--output` (Parquet path), `--output-table` or `--show N` is required. `hypertopos spark find-anomalies --help` lists every option.
|
|
174
192
|
|
|
193
|
+
`find-anomalies` prints the path of its calibration (`calibration: ...`). A scheduled job scores each new batch against it with `score`, which adds no recalibration and can append only the flagged entities to an alerts table:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
hypertopos spark score --input main.aml.transactions_today \
|
|
197
|
+
--calibration /Volumes/main/aml/hypertopos/1bb767d5fc6a53ec \
|
|
198
|
+
--anomalies-only --append --output-table main.aml.daily_alerts
|
|
199
|
+
```
|
|
200
|
+
|
|
175
201
|
## Column roles
|
|
176
202
|
|
|
177
203
|
| Role | Required | Meaning | Accepted types |
|
|
@@ -249,5 +275,5 @@ Times are converted to UTC epoch seconds arithmetically, so results do not depen
|
|
|
249
275
|
## Limits
|
|
250
276
|
|
|
251
277
|
- Dimensions are per entity. Pair-level and chain-level patterns (counterparty graphs, chains, motifs) are built by the file-based builder; see [Configuration](configuration.md).
|
|
252
|
-
- Each dimension is standardised against the population (mean and standard deviation, with a floor of 0.01 on the deviation) and never clipped, so an entity far beyond the usual range stays far. Dimensions are treated as independent: two dimensions that move together each count in `delta_norm`.
|
|
278
|
+
- Each dimension is standardised against the population (mean and standard deviation, with a floor of 0.01 on the deviation) and never clipped, so an entity far beyond the usual range stays far. Dimensions are treated as independent: two dimensions that move together each count in `delta_norm`. The distance is measured from one centre per population, so a population made of several distinct kinds of entity is described poorly without `group_by`.
|
|
253
279
|
- `find_anomalies` calibrates on the data it is given; to measure new data against an earlier calibration, use `score`.
|
|
@@ -61,11 +61,43 @@ def add_parser(sub: Any) -> argparse.ArgumentParser:
|
|
|
61
61
|
out.add_argument(
|
|
62
62
|
"--show", type=int, metavar="N", help="print the N most distant entities instead"
|
|
63
63
|
)
|
|
64
|
+
sc = spark_sub.add_parser(
|
|
65
|
+
"score",
|
|
66
|
+
help="Score new events against a saved calibration (no recalibration)",
|
|
67
|
+
description=(
|
|
68
|
+
"Aggregate new events per entity and score them against the population a "
|
|
69
|
+
"find-anomalies run calibrated, as a scheduled job does every day. "
|
|
70
|
+
"find-anomalies prints the calibration path; give it with --calibration."
|
|
71
|
+
),
|
|
72
|
+
epilog=(
|
|
73
|
+
"example:\n hypertopos spark score --input main.aml.transactions_today "
|
|
74
|
+
"\\\n --calibration /Volumes/main/aml/hypertopos/1bb767d5fc6a53ec "
|
|
75
|
+
"\\\n --anomalies-only --append --output-table main.aml.daily_alerts\n\n"
|
|
76
|
+
f"docs: {DOCS}"
|
|
77
|
+
),
|
|
78
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
79
|
+
)
|
|
80
|
+
sc.add_argument(
|
|
81
|
+
"--input",
|
|
82
|
+
required=True,
|
|
83
|
+
help="Parquet/CSV file or directory, Delta directory, or a table / view name",
|
|
84
|
+
)
|
|
85
|
+
sc.add_argument(
|
|
86
|
+
"--calibration", required=True, help="calibration path printed by find-anomalies"
|
|
87
|
+
)
|
|
88
|
+
sc.add_argument("--anomalies-only", action="store_true", help="keep flagged entities only")
|
|
89
|
+
sc.add_argument("--append", action="store_true", help="append to the output, not overwrite")
|
|
90
|
+
sc_out = sc.add_mutually_exclusive_group(required=True)
|
|
91
|
+
sc_out.add_argument("--output", help="write the result as Parquet to this path")
|
|
92
|
+
sc_out.add_argument("--output-table", help="write the result to this table (saveAsTable)")
|
|
93
|
+
sc_out.add_argument(
|
|
94
|
+
"--show", type=int, metavar="N", help="print the N most distant entities instead"
|
|
95
|
+
)
|
|
64
96
|
return spark_p
|
|
65
97
|
|
|
66
98
|
|
|
67
99
|
def run(args: argparse.Namespace, spark_p: argparse.ArgumentParser) -> None:
|
|
68
|
-
if args.spark_command
|
|
100
|
+
if args.spark_command not in ("find-anomalies", "score"):
|
|
69
101
|
spark_p.print_help()
|
|
70
102
|
sys.exit(1)
|
|
71
103
|
try:
|
|
@@ -73,9 +105,15 @@ def run(args: argparse.Namespace, spark_p: argparse.ArgumentParser) -> None:
|
|
|
73
105
|
except ImportError:
|
|
74
106
|
print('PySpark is not installed: pip install "hypertopos[spark]"', file=sys.stderr)
|
|
75
107
|
sys.exit(2)
|
|
76
|
-
from hypertopos.spark import find_anomalies
|
|
108
|
+
from hypertopos.spark import find_anomalies, score, sphere_of
|
|
77
109
|
|
|
78
110
|
spark = SparkSession.builder.appName("hypertopos").getOrCreate()
|
|
111
|
+
if args.spark_command == "score":
|
|
112
|
+
result = score(read_input(spark, args.input), like=sphere_of(args.calibration))
|
|
113
|
+
if args.anomalies_only:
|
|
114
|
+
result = result.where("is_anomaly")
|
|
115
|
+
_write(result, args, "append" if args.append else "overwrite")
|
|
116
|
+
return
|
|
79
117
|
result = find_anomalies(
|
|
80
118
|
read_input(spark, args.input),
|
|
81
119
|
entity=args.entity,
|
|
@@ -88,12 +126,18 @@ def run(args: argparse.Namespace, spark_p: argparse.ArgumentParser) -> None:
|
|
|
88
126
|
sphere_root=args.sphere_root,
|
|
89
127
|
cache=not args.no_cache,
|
|
90
128
|
)
|
|
129
|
+
# A scheduled score job reads the calibration from this path.
|
|
130
|
+
print(f"calibration: {sphere_of(result).path}")
|
|
131
|
+
_write(result, args, "overwrite")
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _write(result: Any, args: argparse.Namespace, mode: str) -> None:
|
|
91
135
|
if args.show is not None:
|
|
92
136
|
result.orderBy("delta_norm", ascending=False).show(args.show, truncate=False)
|
|
93
137
|
elif args.output_table:
|
|
94
|
-
result.write.mode(
|
|
138
|
+
result.write.mode(mode).saveAsTable(args.output_table)
|
|
95
139
|
else:
|
|
96
|
-
result.write.mode(
|
|
140
|
+
result.write.mode(mode).parquet(args.output)
|
|
97
141
|
|
|
98
142
|
|
|
99
143
|
def read_input(spark: Any, source: str) -> Any:
|
|
@@ -149,8 +149,8 @@ class FrozenCalibration:
|
|
|
149
149
|
delta=delta,
|
|
150
150
|
delta_norm=norm,
|
|
151
151
|
is_anomaly=is_anomaly,
|
|
152
|
-
rank_pct=
|
|
153
|
-
conformal_p=(
|
|
152
|
+
rank_pct=left / population * 100,
|
|
153
|
+
conformal_p=(population - left) / population,
|
|
154
154
|
calibration_scope=scope,
|
|
155
155
|
)
|
|
156
156
|
|
|
@@ -20,7 +20,7 @@ from pyspark.sql import functions as F
|
|
|
20
20
|
|
|
21
21
|
from hypertopos.scoring import MIN_GROUP_SIZE, FrozenCalibration
|
|
22
22
|
from hypertopos.spark._build import KEY, collect_entities, fingerprint, sphere_dir
|
|
23
|
-
from hypertopos.spark._plan import Plan, aggregate, build_plan
|
|
23
|
+
from hypertopos.spark._plan import Plan, aggregate, build_plan, count_entities
|
|
24
24
|
from hypertopos.spark._result import TOP_REASONS, result_table
|
|
25
25
|
|
|
26
26
|
MAX_ENTITIES = 5_000_000
|
|
@@ -30,6 +30,9 @@ CALIBRATION_FILE = "calibration.pkl"
|
|
|
30
30
|
PLAN_FILE = "plan.pkl"
|
|
31
31
|
METADATA_FINGERPRINT = "hypertopos.fingerprint"
|
|
32
32
|
METADATA_PATH = "hypertopos.path"
|
|
33
|
+
METADATA_SCORED = (
|
|
34
|
+
"hypertopos.scored" # set on score() results: their entities are not in the calibration
|
|
35
|
+
)
|
|
33
36
|
|
|
34
37
|
|
|
35
38
|
def _sphere_root(df: DataFrame, sphere_root: str | None) -> str:
|
|
@@ -141,21 +144,23 @@ def _entity_table(
|
|
|
141
144
|
max_entities: int,
|
|
142
145
|
) -> pa.Table:
|
|
143
146
|
entity_df = entity_frame(df, plan, group_by)
|
|
144
|
-
#
|
|
145
|
-
# serverless
|
|
147
|
+
# Cached, counting the frame computes the aggregation once and the collect
|
|
148
|
+
# reads the cache. Where caching is refused (serverless on older client
|
|
149
|
+
# environments) every action recomputes it, so the count comes from the keys
|
|
150
|
+
# alone and the full aggregation runs only for the collect.
|
|
146
151
|
try:
|
|
147
152
|
entity_df = entity_df.persist()
|
|
148
153
|
cached = True
|
|
149
154
|
except AnalysisException:
|
|
150
155
|
cached = False
|
|
151
156
|
try:
|
|
152
|
-
n_entities = entity_df.count()
|
|
157
|
+
n_entities = entity_df.count() if cached else count_entities(df, plan)
|
|
153
158
|
if n_entities > max_entities:
|
|
154
159
|
raise ValueError(
|
|
155
160
|
f"{n_entities} entities exceed max_entities={max_entities}. Raise "
|
|
156
161
|
"max_entities on a driver with more memory."
|
|
157
162
|
)
|
|
158
|
-
return collect_entities(entity_df)
|
|
163
|
+
return collect_entities(entity_df, n_rows=n_entities)
|
|
159
164
|
finally:
|
|
160
165
|
if cached:
|
|
161
166
|
entity_df.unpersist()
|
|
@@ -200,7 +205,13 @@ def _save(path: Path, entities: pa.Table, plan: Plan, calibration: FrozenCalibra
|
|
|
200
205
|
|
|
201
206
|
|
|
202
207
|
def shape_result(
|
|
203
|
-
flat: DataFrame,
|
|
208
|
+
flat: DataFrame,
|
|
209
|
+
n_dims: int,
|
|
210
|
+
fp: str | None,
|
|
211
|
+
path: Path | None,
|
|
212
|
+
group_by: str | None,
|
|
213
|
+
*,
|
|
214
|
+
scored: bool = False,
|
|
204
215
|
) -> DataFrame:
|
|
205
216
|
"""Flat reason columns -> the result contract; metadata only when ``fp`` is given."""
|
|
206
217
|
k = min(TOP_REASONS, n_dims)
|
|
@@ -214,11 +225,10 @@ def shape_result(
|
|
|
214
225
|
for i in range(1, k + 1)
|
|
215
226
|
]
|
|
216
227
|
)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
)
|
|
228
|
+
metadata = {METADATA_FINGERPRINT: fp, METADATA_PATH: str(path)}
|
|
229
|
+
if scored:
|
|
230
|
+
metadata[METADATA_SCORED] = "true"
|
|
231
|
+
key = F.col(KEY).alias(KEY, metadata=metadata) if fp is not None else F.col(KEY)
|
|
222
232
|
columns: list[Column | str] = [
|
|
223
233
|
key,
|
|
224
234
|
"delta_norm",
|
|
@@ -36,7 +36,10 @@ def estimate_bytes(n_rows: int, n_numeric: int) -> int:
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def collect_entities(
|
|
39
|
-
entity_df: DataFrame,
|
|
39
|
+
entity_df: DataFrame,
|
|
40
|
+
*,
|
|
41
|
+
n_rows: int | None = None,
|
|
42
|
+
max_collect_bytes: int = MAX_COLLECT_BYTES,
|
|
40
43
|
) -> pa.Table:
|
|
41
44
|
"""Bring the per-entity table to the driver as Arrow.
|
|
42
45
|
|
|
@@ -44,9 +47,11 @@ def collect_entities(
|
|
|
44
47
|
split by a hash of the key), so no single collect reaches
|
|
45
48
|
``spark.driver.maxResultSize`` and nothing is written to storage the driver
|
|
46
49
|
may not be able to read back (serverless, Volumes). ``entity_df`` should be
|
|
47
|
-
persisted: it is read once per chunk.
|
|
50
|
+
persisted: it is read once per chunk. ``n_rows``, when known, saves a count
|
|
51
|
+
that recomputes the aggregation where the frame cannot be cached.
|
|
48
52
|
"""
|
|
49
|
-
n_rows
|
|
53
|
+
if n_rows is None:
|
|
54
|
+
n_rows = entity_df.count()
|
|
50
55
|
if n_rows == 0:
|
|
51
56
|
raise ValueError("the aggregation produced no entities; check the entity column")
|
|
52
57
|
size = estimate_bytes(n_rows, len(entity_df.columns) - 1)
|
|
@@ -22,6 +22,7 @@ import pyarrow as pa
|
|
|
22
22
|
import pyarrow.compute as pc
|
|
23
23
|
import pyarrow.parquet as pq
|
|
24
24
|
from pyspark.sql import DataFrame, SparkSession
|
|
25
|
+
from pyspark.sql import functions as F
|
|
25
26
|
|
|
26
27
|
from hypertopos.scoring import FrozenCalibration
|
|
27
28
|
from hypertopos.spark._api import (
|
|
@@ -29,8 +30,11 @@ from hypertopos.spark._api import (
|
|
|
29
30
|
ENTITIES_FILE,
|
|
30
31
|
METADATA_FINGERPRINT,
|
|
31
32
|
METADATA_PATH,
|
|
33
|
+
METADATA_SCORED,
|
|
34
|
+
PLAN_FILE,
|
|
35
|
+
entity_frame,
|
|
32
36
|
)
|
|
33
|
-
from hypertopos.spark._build import KEY, build_sphere
|
|
37
|
+
from hypertopos.spark._build import KEY, build_sphere, collect_entities
|
|
34
38
|
|
|
35
39
|
SPHERE_DIR = "sphere"
|
|
36
40
|
_MCP_ARGS = ("-m", "hypertopos_mcp.main")
|
|
@@ -38,7 +42,7 @@ _MCP_ARGS = ("-m", "hypertopos_mcp.main")
|
|
|
38
42
|
|
|
39
43
|
@dataclass(frozen=True)
|
|
40
44
|
class Sphere:
|
|
41
|
-
"""The calibration behind a ``find_anomalies`` result,
|
|
45
|
+
"""The calibration behind a ``find_anomalies`` result: entities, calibration, geometry."""
|
|
42
46
|
|
|
43
47
|
path: Path
|
|
44
48
|
fingerprint: str
|
|
@@ -117,8 +121,20 @@ class Sphere:
|
|
|
117
121
|
spark.createDataFrame(self.geometry().to_pandas()).write.mode(mode).saveAsTable(table)
|
|
118
122
|
|
|
119
123
|
|
|
120
|
-
def sphere_of(result: DataFrame) -> Sphere:
|
|
121
|
-
"""The ``Sphere`` behind a ``find_anomalies`` result
|
|
124
|
+
def sphere_of(result: DataFrame | str | os.PathLike[str]) -> Sphere:
|
|
125
|
+
"""The ``Sphere`` behind a ``find_anomalies`` result, or saved at a path.
|
|
126
|
+
|
|
127
|
+
A path is the ``Sphere.path`` of an earlier result kept on persistent storage
|
|
128
|
+
(``sphere_root``), so a later job, in a new process, can score against it.
|
|
129
|
+
"""
|
|
130
|
+
if isinstance(result, (str, os.PathLike)):
|
|
131
|
+
path = Path(result)
|
|
132
|
+
if not (path / CALIBRATION_FILE).exists():
|
|
133
|
+
raise FileNotFoundError(
|
|
134
|
+
f"no hypertopos calibration at {path}: pass the path of sphere_of(result) "
|
|
135
|
+
"from a find_anomalies call whose sphere_root is persistent storage"
|
|
136
|
+
)
|
|
137
|
+
return Sphere(path=path, fingerprint=path.name)
|
|
122
138
|
metadata = result.schema[KEY].metadata if KEY in result.columns else {}
|
|
123
139
|
if METADATA_PATH not in metadata:
|
|
124
140
|
raise ValueError(
|
|
@@ -134,19 +150,37 @@ def sphere_of(result: DataFrame) -> Sphere:
|
|
|
134
150
|
return Sphere(path=path, fingerprint=metadata[METADATA_FINGERPRINT])
|
|
135
151
|
|
|
136
152
|
|
|
153
|
+
def _scored_entities(
|
|
154
|
+
events: DataFrame, sphere: Sphere, keys: list[str], group_by: str | None
|
|
155
|
+
) -> pa.Table:
|
|
156
|
+
"""The entity table of ``keys``, aggregated from their own events only."""
|
|
157
|
+
with open(sphere.path / PLAN_FILE, "rb") as fh:
|
|
158
|
+
plan = pickle.load(fh)
|
|
159
|
+
roles = plan.roles
|
|
160
|
+
touches = F.col(roles["entity"]).cast("string").isin(keys)
|
|
161
|
+
if "counterparty" in roles:
|
|
162
|
+
touches = touches | F.col(roles["counterparty"]).cast("string").isin(keys)
|
|
163
|
+
frame = entity_frame(events.where(touches), plan, group_by)
|
|
164
|
+
return collect_entities(frame.where(F.col(KEY).isin(keys)))
|
|
165
|
+
|
|
166
|
+
|
|
137
167
|
def explain(
|
|
138
168
|
result: DataFrame,
|
|
139
169
|
entities: Sequence[str] | None = None,
|
|
140
170
|
top_n: int = 50,
|
|
141
171
|
dims: Sequence[str] | None = None,
|
|
172
|
+
events: DataFrame | None = None,
|
|
142
173
|
) -> DataFrame:
|
|
143
174
|
"""Why entities stand out: one row per entity and dimension.
|
|
144
175
|
|
|
145
176
|
Args:
|
|
146
|
-
result: The DataFrame ``find_anomalies`` returned.
|
|
177
|
+
result: The DataFrame ``find_anomalies`` or ``score`` returned.
|
|
147
178
|
entities: Entity keys to explain; default is the ``top_n`` most distant.
|
|
148
179
|
top_n: How many of the most distant entities, when ``entities`` is None.
|
|
149
180
|
dims: Restrict to these dimensions; default is all.
|
|
181
|
+
events: For a ``score`` result, the events it scored: their entities are
|
|
182
|
+
not in the calibration, so their dimensions are recomputed from the
|
|
183
|
+
events of the explained entities only.
|
|
150
184
|
|
|
151
185
|
Returns:
|
|
152
186
|
``entity, dim, value, mu, sigma, delta, pct_of_total, direction``: the
|
|
@@ -169,8 +203,16 @@ def explain(
|
|
|
169
203
|
]
|
|
170
204
|
else:
|
|
171
205
|
keys = [str(k) for k in entities]
|
|
172
|
-
|
|
173
|
-
|
|
206
|
+
if KEY in result.columns and result.schema[KEY].metadata.get(METADATA_SCORED):
|
|
207
|
+
if events is None:
|
|
208
|
+
raise ValueError(
|
|
209
|
+
"this is a score() result: its entities are not in the calibration; "
|
|
210
|
+
"pass the events it scored, explain(result, events=df)"
|
|
211
|
+
)
|
|
212
|
+
table = _scored_entities(events, sphere, keys, calibration.group_by)
|
|
213
|
+
else:
|
|
214
|
+
table = sphere.entities()
|
|
215
|
+
table = table.filter(pc.is_in(table[KEY], value_set=pa.array(keys, pa.string())))
|
|
174
216
|
missing = set(keys) - set(table[KEY].to_pylist())
|
|
175
217
|
if missing:
|
|
176
218
|
raise ValueError(f"not in this result: {sorted(missing)[:10]}")
|
|
@@ -335,6 +335,11 @@ def _log1p_non_negative(col: Column) -> Column:
|
|
|
335
335
|
return F.log1p(F.greatest(col, F.lit(0.0)))
|
|
336
336
|
|
|
337
337
|
|
|
338
|
+
def count_entities(df: DataFrame, plan: Plan) -> int:
|
|
339
|
+
"""Entities ``aggregate`` produces, from the keys alone (no dimensions computed)."""
|
|
340
|
+
return int(_long_table(df, plan).select("key").distinct().count())
|
|
341
|
+
|
|
342
|
+
|
|
338
343
|
def aggregate(df: DataFrame, plan: Plan) -> DataFrame:
|
|
339
344
|
"""Compile the plan to Spark: one row per entity, ``entity`` + the plan's dims."""
|
|
340
345
|
long = _long_table(df, plan)
|
|
@@ -32,8 +32,9 @@ def score(df: DataFrame, like: DataFrame | Sphere) -> DataFrame:
|
|
|
32
32
|
against the frozen population: no recalibration, so ``p_value`` and
|
|
33
33
|
``rank_pct`` place each entity within the original population. The
|
|
34
34
|
aggregation and the scoring both run on the executors; only the
|
|
35
|
-
calibration (a few arrays) travels with the tasks.
|
|
36
|
-
calibration
|
|
35
|
+
calibration (a few arrays) travels with the tasks. ``sphere_of`` on the
|
|
36
|
+
result gives the calibration; ``explain(result, events=df)`` explains its
|
|
37
|
+
entities from the events they were scored on.
|
|
37
38
|
"""
|
|
38
39
|
sphere = like if isinstance(like, Sphere) else sphere_of(like)
|
|
39
40
|
calibration = sphere.calibration()
|
|
@@ -41,7 +42,14 @@ def score(df: DataFrame, like: DataFrame | Sphere) -> DataFrame:
|
|
|
41
42
|
plan: Plan = pickle.load(fh)
|
|
42
43
|
entities = entity_frame(df, plan, calibration.group_by)
|
|
43
44
|
flat = entities.mapInArrow(_scorer(calibration), _result_schema(calibration))
|
|
44
|
-
return shape_result(
|
|
45
|
+
return shape_result(
|
|
46
|
+
flat,
|
|
47
|
+
len(calibration.dims),
|
|
48
|
+
sphere.fingerprint,
|
|
49
|
+
sphere.path,
|
|
50
|
+
calibration.group_by,
|
|
51
|
+
scored=True,
|
|
52
|
+
)
|
|
45
53
|
|
|
46
54
|
|
|
47
55
|
def _scorer(
|