ab-analysis-kit 0.1.1__tar.gz → 0.2.0__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.
- {ab_analysis_kit-0.1.1/ab_analysis_kit.egg-info → ab_analysis_kit-0.2.0}/PKG-INFO +8 -8
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/README.md +7 -7
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0/ab_analysis_kit.egg-info}/PKG-INFO +8 -8
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/ab_analysis_kit.egg-info/SOURCES.txt +2 -1
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/__init__.py +1 -1
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/cli.md +8 -3
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/explore.md +2 -1
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/validate.md +10 -3
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-explore/SKILL.md +3 -2
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-validate/SKILL.md +4 -2
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/validate.py +33 -4
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/main.py +28 -3
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/driver.py +12 -1
- ab_analysis_kit-0.2.0/abkit/reporting/assets/report.js +151 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/base.py +150 -1
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/bootstrap.py +14 -7
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/ci.py +10 -2
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/paired_bootstrap.py +5 -5
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/poisson_bootstrap.py +10 -10
- ab_analysis_kit-0.2.0/abkit/stats/effects.py +355 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/cuped_ttest.py +77 -13
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/paired_cuped_ttest.py +3 -12
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/paired_ttest.py +68 -15
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/ratio_delta.py +84 -15
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/ttest.py +56 -13
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/ztest.py +87 -15
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/power.py +20 -2
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/samples.py +18 -5
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/sequential/confidence_sequence.py +77 -3
- ab_analysis_kit-0.2.0/abkit/tuning/assets/explore.js +177 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/server.py +29 -15
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/family.py +454 -3
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/inject.py +70 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/runner.py +96 -10
- ab_analysis_kit-0.2.0/abkit/validate/scoring.py +1114 -0
- ab_analysis_kit-0.2.0/abkit/validate/vector_resample.py +503 -0
- ab_analysis_kit-0.1.1/abkit/reporting/assets/report.js +0 -148
- ab_analysis_kit-0.1.1/abkit/stats/effects.py +0 -141
- ab_analysis_kit-0.1.1/abkit/tuning/assets/explore.js +0 -173
- ab_analysis_kit-0.1.1/abkit/validate/scoring.py +0 -545
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/LICENSE +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/MANIFEST.in +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/ab_analysis_kit.egg-info/dependency_links.txt +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/ab_analysis_kit.egg-info/entry_points.txt +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/ab_analysis_kit.egg-info/requires.txt +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/ab_analysis_kit.egg-info/top_level.txt +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/_output.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/CLAUDE.section.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/experiments.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/methods.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/metrics.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/overview.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/plan.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/rules/project.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-feedback/SKILL.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-new-experiment/SKILL.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-new-metric/SKILL.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-plan/SKILL.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-setup-project/SKILL.md +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/_context.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/clean.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/explore.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/init.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/init_claude.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/plan.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/run.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/test_report.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/commands/unlock.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/compute/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/compute/recompute_backend.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/discovery.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/experiment_config.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/method_config.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/metric_config.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/profile.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/project_config.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/config/validator.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/core/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/core/interval.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/core/models.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/core/period_planner.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/_sql_manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/clickhouse_manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_aa_runs.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_base.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_experiments.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_exposures.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_maintenance.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_results.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_schema.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_tasks.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/_unit_state.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/internal_tables/manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/mysql_manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/postgres_manager.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/database/tables.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/loaders/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/loaders/exposure_loader.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/loaders/metric_loader.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/loaders/query_template.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/loaders/templates/abkit_assignment.jinja +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/base.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/branding.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/email.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/factory.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/mattermost.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/mock.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/slack.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/telegram.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/notify/webhook.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/_types.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/analyze.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/enrich.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/pipeline/readout.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/planning/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/planning/sizing.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/reporting/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/reporting/builder.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/reporting/calibration.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/reporting/html_report.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/accumulate.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/applier.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/engine.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/paired_post_normed_bootstrap.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/bootstrap/post_normed_bootstrap.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/correction.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/exceptions.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/factory.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/parametric/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/registry.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/result.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/rng.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/sequential/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/sequential/apply.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/sequential/mixture.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/stats/srm.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/config_writer.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/html.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/payload.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/recompute.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/tuning/session.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/utils/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/utils/datetime_utils.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/utils/env_interpolation.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/utils/json_utils.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/__init__.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/_types.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/load.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/panel.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/persistence.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/resample.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/result.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/validate/run_id.py +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/pyproject.toml +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/requirements.txt +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/setup.cfg +0 -0
- {ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ab-analysis-kit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A/B experiment analysis as declarative YAML + SQL
|
|
5
5
|
Author: ab-analysis-kit authors
|
|
6
6
|
License: MIT
|
|
@@ -76,22 +76,22 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
|
|
|
76
76
|
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
77
77
|
actually calibrated.
|
|
78
78
|
|
|
79
|
-
> **Status: `0.
|
|
79
|
+
> **Status: `0.2.0` (Alpha) — release-ready** (milestones **M1–M7**; `0.1.2` is the
|
|
80
|
+
> latest published on PyPI, the `v0.2.0` tag/publish is the maintainer's pending step). The
|
|
80
81
|
> statistical core, the declarative config / DB / pipeline layer, the explore cockpit +
|
|
81
|
-
> self-contained reports, `abk validate
|
|
82
|
-
> DX layer (`abk init-claude`, docs site,
|
|
83
|
-
>
|
|
82
|
+
> self-contained reports, `abk validate` (now numpy-vectorized — minutes → sub-seconds),
|
|
83
|
+
> opt-in sequential analysis + `abk plan`, and the DX layer (`abk init-claude`, docs site,
|
|
84
|
+
> Prefect scaffolding) are all shipped. Docs: [abkit.pipelab.dev](https://abkit.pipelab.dev).
|
|
84
85
|
|
|
85
86
|
## Install
|
|
86
87
|
|
|
87
|
-
Once `0.1.0` is published to PyPI (a maintainer tags `v0.1.0`; until then install from
|
|
88
|
-
source — `pip install -e ".[dev]"`):
|
|
89
|
-
|
|
90
88
|
```bash
|
|
91
89
|
pip install ab-analysis-kit # Python 3.10+; add a DB extra for real data:
|
|
92
90
|
pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
|
|
93
91
|
```
|
|
94
92
|
|
|
93
|
+
(For `0.2.0` before its tag lands, install from source — `pip install -e ".[dev]"`.)
|
|
94
|
+
|
|
95
95
|
`abk --version` and `abk --help` work with no database driver; you can even lint a
|
|
96
96
|
config (`abk run --steps validate`) with no database at all. See the
|
|
97
97
|
[getting-started guide](https://abkit.pipelab.dev) for the full first run.
|
|
@@ -11,22 +11,22 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
|
|
|
11
11
|
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
12
12
|
actually calibrated.
|
|
13
13
|
|
|
14
|
-
> **Status: `0.
|
|
14
|
+
> **Status: `0.2.0` (Alpha) — release-ready** (milestones **M1–M7**; `0.1.2` is the
|
|
15
|
+
> latest published on PyPI, the `v0.2.0` tag/publish is the maintainer's pending step). The
|
|
15
16
|
> statistical core, the declarative config / DB / pipeline layer, the explore cockpit +
|
|
16
|
-
> self-contained reports, `abk validate
|
|
17
|
-
> DX layer (`abk init-claude`, docs site,
|
|
18
|
-
>
|
|
17
|
+
> self-contained reports, `abk validate` (now numpy-vectorized — minutes → sub-seconds),
|
|
18
|
+
> opt-in sequential analysis + `abk plan`, and the DX layer (`abk init-claude`, docs site,
|
|
19
|
+
> Prefect scaffolding) are all shipped. Docs: [abkit.pipelab.dev](https://abkit.pipelab.dev).
|
|
19
20
|
|
|
20
21
|
## Install
|
|
21
22
|
|
|
22
|
-
Once `0.1.0` is published to PyPI (a maintainer tags `v0.1.0`; until then install from
|
|
23
|
-
source — `pip install -e ".[dev]"`):
|
|
24
|
-
|
|
25
23
|
```bash
|
|
26
24
|
pip install ab-analysis-kit # Python 3.10+; add a DB extra for real data:
|
|
27
25
|
pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
|
|
28
26
|
```
|
|
29
27
|
|
|
28
|
+
(For `0.2.0` before its tag lands, install from source — `pip install -e ".[dev]"`.)
|
|
29
|
+
|
|
30
30
|
`abk --version` and `abk --help` work with no database driver; you can even lint a
|
|
31
31
|
config (`abk run --steps validate`) with no database at all. See the
|
|
32
32
|
[getting-started guide](https://abkit.pipelab.dev) for the full first run.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ab-analysis-kit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A/B experiment analysis as declarative YAML + SQL
|
|
5
5
|
Author: ab-analysis-kit authors
|
|
6
6
|
License: MIT
|
|
@@ -76,22 +76,22 @@ stabilization chart), writes them to a clean warehouse table any BI can read, an
|
|
|
76
76
|
gives you a local cockpit to tune the analysis and a harness to prove your method is
|
|
77
77
|
actually calibrated.
|
|
78
78
|
|
|
79
|
-
> **Status: `0.
|
|
79
|
+
> **Status: `0.2.0` (Alpha) — release-ready** (milestones **M1–M7**; `0.1.2` is the
|
|
80
|
+
> latest published on PyPI, the `v0.2.0` tag/publish is the maintainer's pending step). The
|
|
80
81
|
> statistical core, the declarative config / DB / pipeline layer, the explore cockpit +
|
|
81
|
-
> self-contained reports, `abk validate
|
|
82
|
-
> DX layer (`abk init-claude`, docs site,
|
|
83
|
-
>
|
|
82
|
+
> self-contained reports, `abk validate` (now numpy-vectorized — minutes → sub-seconds),
|
|
83
|
+
> opt-in sequential analysis + `abk plan`, and the DX layer (`abk init-claude`, docs site,
|
|
84
|
+
> Prefect scaffolding) are all shipped. Docs: [abkit.pipelab.dev](https://abkit.pipelab.dev).
|
|
84
85
|
|
|
85
86
|
## Install
|
|
86
87
|
|
|
87
|
-
Once `0.1.0` is published to PyPI (a maintainer tags `v0.1.0`; until then install from
|
|
88
|
-
source — `pip install -e ".[dev]"`):
|
|
89
|
-
|
|
90
88
|
```bash
|
|
91
89
|
pip install ab-analysis-kit # Python 3.10+; add a DB extra for real data:
|
|
92
90
|
pip install "ab-analysis-kit[clickhouse]" # or [postgres] / [mysql] / [all-db]
|
|
93
91
|
```
|
|
94
92
|
|
|
93
|
+
(For `0.2.0` before its tag lands, install from source — `pip install -e ".[dev]"`.)
|
|
94
|
+
|
|
95
95
|
`abk --version` and `abk --help` work with no database driver; you can even lint a
|
|
96
96
|
config (`abk run --steps validate`) with no database at all. See the
|
|
97
97
|
[getting-started guide](https://abkit.pipelab.dev) for the full first run.
|
|
@@ -10,7 +10,7 @@ from __future__ import annotations
|
|
|
10
10
|
|
|
11
11
|
from typing import Any
|
|
12
12
|
|
|
13
|
-
__version__ = "0.
|
|
13
|
+
__version__ = "0.2.0"
|
|
14
14
|
|
|
15
15
|
#: Symbols re-exported lazily from ``abkit.stats`` (PEP 562) so importing
|
|
16
16
|
#: ``abkit`` for ``__version__`` (the CLI path) stays numpy-free and fast.
|
|
@@ -124,8 +124,8 @@ re-run `abk run` afterward to recompute under the new config. Full reference:
|
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
126
|
abk validate [--select <exp>] [--method <m>]... [--metric <m>] [--iterations N] \
|
|
127
|
-
[--inject-effect PCT] [--scoring fpr|power|mde]
|
|
128
|
-
[--force] [--profile NAME]
|
|
127
|
+
[--family-sweep] [--inject-effect PCT] [--scoring fpr|power|mde] \
|
|
128
|
+
[--report [PATH]] [--force] [--profile NAME]
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
The A/A false-positive + power **matrix** — placebo label-permutation splits on
|
|
@@ -140,7 +140,12 @@ calibration chip.
|
|
|
140
140
|
- `--method / -m` (repeatable) — score EXTRA registered methods beyond the declared
|
|
141
141
|
comparison (the method-grid axis; see the selector model above).
|
|
142
142
|
- `--metric` — validate only this metric (default: every declared comparison).
|
|
143
|
-
- `--iterations / -n`
|
|
143
|
+
- `--iterations / -n` — placebo A/A splits per cell (default: auto,
|
|
144
|
+
`max(2000, ⌈200/α⌉)` at each cell's effective alpha; an explicit N overrides
|
|
145
|
+
every cell).
|
|
146
|
+
- `--family-sweep` — also run the composed multi-metric FWER/FDR sweep (D9);
|
|
147
|
+
roughly doubles the cost. Opt-in since 0.2.0 (it used to auto-run whenever
|
|
148
|
+
`--metric` was omitted).
|
|
144
149
|
- `--inject-effect PCT` — inject a relative effect (e.g. `0.05`) to measure
|
|
145
150
|
power / achieved MDE / coverage.
|
|
146
151
|
- `--scoring fpr|power|mde` (default `fpr`) — the objective for the "Recommended"
|
|
@@ -39,7 +39,8 @@ name a configured **comparison** of that experiment (default: the main metric).
|
|
|
39
39
|
flag**. Pre-horizon fixed CIs render de-emphasized (peeking is not free).
|
|
40
40
|
- **Side rail (mode-aware, Basic / Advanced disclosure)** — the knobs, auto-derived
|
|
41
41
|
from the live method's `param_specs`. **Basic** shows the median-analyst surface
|
|
42
|
-
(
|
|
42
|
+
(the method picker — pick `cuped-t-test` for CUPED — plus `test_type` and `alpha`);
|
|
43
|
+
**Advanced** opens the full ~9-knob set:
|
|
43
44
|
covariate + `covariate_lookback`, stratification keys, bootstrap iterations,
|
|
44
45
|
`correction`, analysis unit (preview-only). Sidedness and winsorization are
|
|
45
46
|
**not** here — the stats core has no such params (two-sided p-values, no winsor).
|
|
@@ -28,7 +28,9 @@ shuffle is in-memory only; it never touches the real assignment.
|
|
|
28
28
|
labels destroys any true treatment effect → an **exact null** by construction (the
|
|
29
29
|
standard permutation-A/A), while still exercising the real grid, cadence, cohort,
|
|
30
30
|
and metric SQL.
|
|
31
|
-
3. **A/A (false-positive):** repeat N times (default
|
|
31
|
+
3. **A/A (false-positive):** repeat N times (default since 0.2.0: auto per cell,
|
|
32
|
+
`max(2000, ⌈200/α⌉)` at the cell's effective alpha — ≈4000 at 5%, ≈40000 at
|
|
33
|
+
0.5%; `-n` overrides every cell, auto-N >100k warns but never caps); each split runs the
|
|
32
34
|
candidate method(s) and records whether it *falsely* rejects H₀ at the effective
|
|
33
35
|
α. **FPR** = share of placebo runs that flagged significance. The significance
|
|
34
36
|
primitive is the readout's own **CI-excludes-zero** rule, not the raw `reject`
|
|
@@ -87,6 +89,9 @@ metrics under one shared assignment, corrected by two-tier Bonferroni (compute-t
|
|
|
87
89
|
error rate** (any false rejection across the family) and **false-discovery rate**
|
|
88
90
|
(mean false fraction among rejections) over one shared union-cohort placebo
|
|
89
91
|
assignment per iteration, under the *same* composed rule the readout applies.
|
|
92
|
+
**Opt-in since 0.2.0 via `--family-sweep`** (it roughly doubles the run; before
|
|
93
|
+
0.2.0 it always ran when `--metric` was omitted — a bare multi-metric run now
|
|
94
|
+
prints a one-release notice instead).
|
|
90
95
|
|
|
91
96
|
On the complete null the two coincide (every rejection is false) and sit at the
|
|
92
97
|
composed rule's **nominal rate** — ≈ α *per tier*, so ≈ 2α whole-family under the
|
|
@@ -104,7 +109,8 @@ family level. (Only `alpha_spending`/group-sequential stays a future item.)
|
|
|
104
109
|
|
|
105
110
|
```bash
|
|
106
111
|
abk validate --select <exp> [--method <m>]... [--metric <m>] [--iterations N] \
|
|
107
|
-
[--inject-effect <rel>] [--scoring fpr|power|mde]
|
|
112
|
+
[--family-sweep] [--inject-effect <rel>] [--scoring fpr|power|mde] \
|
|
113
|
+
[--report] [--force] [--profile]
|
|
108
114
|
```
|
|
109
115
|
|
|
110
116
|
| Flag | Meaning |
|
|
@@ -112,7 +118,8 @@ abk validate --select <exp> [--method <m>]... [--metric <m>] [--iterations N] \
|
|
|
112
118
|
| `--select`, `-s` | Experiment selector (name / glob / `tag:<tag>` / `*`; repeatable, default all). |
|
|
113
119
|
| `--method`, `-m` | **Extra** registered method(s) to score **beyond** the declared comparison — this is the method-grid axis (repeatable). NOT `--select`. |
|
|
114
120
|
| `--metric` | Validate only this metric (default: every declared comparison). |
|
|
115
|
-
| `--iterations`, `-n` | Placebo A/A splits per cell (default 2000).
|
|
121
|
+
| `--iterations`, `-n` | Placebo A/A splits per cell (default: auto, `max(2000, ⌈200/α⌉)` per cell's effective alpha). An explicit N overrides every cell. |
|
|
122
|
+
| `--family-sweep` | Also run the composed multi-metric FWER/FDR sweep (D9) — roughly doubles the cost. Opt-in since 0.2.0. |
|
|
116
123
|
| `--inject-effect` | Inject this **relative** effect (e.g. `0.05`) to measure power / achieved MDE / coverage. |
|
|
117
124
|
| `--scoring` | `fpr` (default) / `power` / `mde` — the objective for the **"Recommended" row only**. All columns are always computed regardless. |
|
|
118
125
|
| `--report` | Emit a self-contained HTML matrix report (best-effort). Bare → `reports/<exp>__validate.html`; a dir or `.html` path overrides. |
|
{ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-explore/SKILL.md
RENAMED
|
@@ -99,8 +99,9 @@ fix the assignment before tuning anything else.
|
|
|
99
99
|
|
|
100
100
|
The rail defaults to **Basic** and reveals the rest under **Advanced**:
|
|
101
101
|
|
|
102
|
-
- **Basic** —
|
|
103
|
-
|
|
102
|
+
- **Basic** — the **method picker** (choose the `cuped-t-test` variant to turn on
|
|
103
|
+
CUPED), `test_type` (`relative` vs `absolute` effect), and **alpha**. These cover
|
|
104
|
+
the median analyst.
|
|
104
105
|
- **Advanced** — the CUPED **covariate + lookback** (`covariate_lookback`, a whole-
|
|
105
106
|
day window like `14d`), **stratification keys**, **bootstrap iterations**
|
|
106
107
|
(`n_samples` for a bootstrap method), the multiple-comparison **correction**
|
{ab_analysis_kit-0.1.1 → ab_analysis_kit-0.2.0}/abkit/cli/assets/claude/skills/abk-validate/SKILL.md
RENAMED
|
@@ -43,7 +43,8 @@ schema, the sequential/composed columns, budget-band resolution).
|
|
|
43
43
|
## Step 1 — Run validate
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
abk validate --select <exp> # every declared comparison,
|
|
46
|
+
abk validate --select <exp> # every declared comparison, auto N = max(2000, ceil(200/alpha)) per cell
|
|
47
|
+
abk validate --select <exp> --family-sweep # + the composed multi-metric FWER/FDR sweep (opt-in since 0.2.0)
|
|
47
48
|
abk validate --select <exp> --metric <m> # one metric only
|
|
48
49
|
abk validate --select <exp> --method z-test # score an EXTRA method beyond the declared one
|
|
49
50
|
abk validate --select <exp> --iterations 500 # quick look (looser FPR estimate)
|
|
@@ -55,7 +56,8 @@ abk validate --select <exp> --inject-effect 0.05 # also measure power / achi
|
|
|
55
56
|
| `--select`, `-s` | Experiment selector (name / glob / `tag:<tag>` / `*`; repeatable, default all). |
|
|
56
57
|
| `--method`, `-m` | **Extra** registered method(s) to score **beyond** the declared comparison — the method-grid axis (repeatable). Not a selector. |
|
|
57
58
|
| `--metric` | Validate only this metric (default: every declared comparison). |
|
|
58
|
-
| `--iterations`, `-n` | Placebo A/A splits per cell (default 2000).
|
|
59
|
+
| `--iterations`, `-n` | Placebo A/A splits per cell (default: auto, `max(2000, ⌈200/α⌉)` at each cell's effective alpha). An explicit N overrides every cell. |
|
|
60
|
+
| `--family-sweep` | Also run the composed multi-metric FWER/FDR sweep — roughly doubles the cost. Opt-in since 0.2.0 (previously always ran when `--metric` was omitted). |
|
|
59
61
|
| `--inject-effect` | Inject this **relative** effect (e.g. `0.05`) to measure power / achieved MDE / coverage. Without it, only FPR/peeking compute. |
|
|
60
62
|
| `--scoring` | `fpr` (default) / `power` / `mde` — the objective for the **"Recommended" row only**. All columns compute regardless. |
|
|
61
63
|
| `--report` | Emit a self-contained HTML matrix (best-effort). Bare → `reports/<exp>__validate.html`; a dir or `.html` path overrides. |
|
|
@@ -57,12 +57,14 @@ def run_validate(
|
|
|
57
57
|
select: tuple[str, ...],
|
|
58
58
|
method: tuple[str, ...],
|
|
59
59
|
metric: str | None,
|
|
60
|
-
iterations: int,
|
|
60
|
+
iterations: int | None,
|
|
61
61
|
inject_effect: float | None,
|
|
62
62
|
scoring: str,
|
|
63
63
|
report_path: str | None,
|
|
64
64
|
force: bool,
|
|
65
65
|
profile: str | None,
|
|
66
|
+
*,
|
|
67
|
+
family_sweep: bool = False,
|
|
66
68
|
) -> None:
|
|
67
69
|
context = load_project_context(require_profiles=True)
|
|
68
70
|
click.echo(f"Project root: {context.root}")
|
|
@@ -107,6 +109,7 @@ def run_validate(
|
|
|
107
109
|
scoring,
|
|
108
110
|
report_path,
|
|
109
111
|
force,
|
|
112
|
+
family_sweep,
|
|
110
113
|
)
|
|
111
114
|
if status == "failed":
|
|
112
115
|
failed += 1
|
|
@@ -127,6 +130,7 @@ def _validate_one(
|
|
|
127
130
|
scoring,
|
|
128
131
|
report_path,
|
|
129
132
|
force,
|
|
133
|
+
family_sweep,
|
|
130
134
|
) -> str:
|
|
131
135
|
from abkit.compute.recompute_backend import RecomputeBackend
|
|
132
136
|
from abkit.database.internal_tables import InternalTablesManager
|
|
@@ -174,9 +178,17 @@ def _validate_one(
|
|
|
174
178
|
extra_methods = [MethodConfig(name=name) for name in method_names]
|
|
175
179
|
metric_sqls = {cfg.name: cfg.get_query_text(context.root) for _, cfg in context.metrics}
|
|
176
180
|
settings = ValidateSettings(
|
|
177
|
-
iterations=iterations,
|
|
181
|
+
iterations=iterations,
|
|
182
|
+
inject_effect=inject_effect,
|
|
183
|
+
mode=scoring,
|
|
184
|
+
family_sweep=family_sweep,
|
|
178
185
|
)
|
|
179
|
-
|
|
186
|
+
splits = (
|
|
187
|
+
f"{iterations} placebo splits/cell"
|
|
188
|
+
if iterations is not None
|
|
189
|
+
else "auto placebo splits/cell: max(2000, ceil(200/alpha)) at each cell's alpha"
|
|
190
|
+
)
|
|
191
|
+
renderer("resample", splits)
|
|
180
192
|
|
|
181
193
|
result = run_validation(
|
|
182
194
|
backend,
|
|
@@ -189,8 +201,9 @@ def _validate_one(
|
|
|
189
201
|
now_iso=now_utc_naive().isoformat(),
|
|
190
202
|
extra_methods=extra_methods,
|
|
191
203
|
metric_filter=metric_filter,
|
|
204
|
+
progress=lambda line: renderer("score", line),
|
|
192
205
|
)
|
|
193
|
-
renderer("score", f"{len(result.cells)} cell(s)")
|
|
206
|
+
renderer("score", f"{len(result.cells)} cell(s) scored")
|
|
194
207
|
|
|
195
208
|
records = aa_run_records(result)
|
|
196
209
|
for record in records:
|
|
@@ -198,6 +211,22 @@ def _validate_one(
|
|
|
198
211
|
renderer("persist", f"{len(records)} _ab_aa_runs row(s)")
|
|
199
212
|
|
|
200
213
|
_emit_matrix(experiment.name, result)
|
|
214
|
+
# the §4.1 warn-uncapped safeguard must reach the terminal, not just the
|
|
215
|
+
# decision log (round-2 review finding: decision_log's only other consumer
|
|
216
|
+
# is the Auto-mode JSON reply — without this echo the warning is invisible
|
|
217
|
+
# exactly when a tight alpha tier makes the default run long)
|
|
218
|
+
for entry in result.decision_log:
|
|
219
|
+
if entry.stage == "resample" and "uncapped" in entry.message:
|
|
220
|
+
click.echo(click.style(f" │ warning: {entry.message}", fg="yellow"))
|
|
221
|
+
if not family_sweep and metric_filter is None and len(experiment.comparisons) >= 2:
|
|
222
|
+
# one-release migration notice for the 0.2.0 default flip (m7 WP6)
|
|
223
|
+
click.echo(
|
|
224
|
+
click.style(
|
|
225
|
+
" │ note: the composed family sweep no longer runs by default — "
|
|
226
|
+
"pass --family-sweep to include it (behavior change in 0.2.0)",
|
|
227
|
+
fg="yellow",
|
|
228
|
+
)
|
|
229
|
+
)
|
|
201
230
|
tables.release_lock(experiment.name, "pipeline", "validate", status="completed")
|
|
202
231
|
except BaseException as exc: # incl. KeyboardInterrupt/SystemExit — never strand the lock
|
|
203
232
|
tables.release_lock(
|
|
@@ -197,7 +197,22 @@ def explore(
|
|
|
197
197
|
)
|
|
198
198
|
@click.option("--metric", help="Validate only this metric (default: every declared comparison)")
|
|
199
199
|
@click.option(
|
|
200
|
-
"--iterations",
|
|
200
|
+
"--iterations",
|
|
201
|
+
"-n",
|
|
202
|
+
type=int,
|
|
203
|
+
default=None,
|
|
204
|
+
help=(
|
|
205
|
+
"Placebo A/A splits per cell (default: tied to each cell's effective alpha, "
|
|
206
|
+
"max(2000, ceil(200/alpha)) — e.g. 4000 at the 5% main tier)"
|
|
207
|
+
),
|
|
208
|
+
)
|
|
209
|
+
@click.option(
|
|
210
|
+
"--family-sweep/--no-family-sweep",
|
|
211
|
+
default=False,
|
|
212
|
+
help=(
|
|
213
|
+
"Also run the composed multi-metric FWER/FDR sweep (D9) — roughly doubles the "
|
|
214
|
+
"cost; before 0.2.0 it always ran when --metric was omitted"
|
|
215
|
+
),
|
|
201
216
|
)
|
|
202
217
|
@click.option(
|
|
203
218
|
"--inject-effect",
|
|
@@ -229,7 +244,8 @@ def validate(
|
|
|
229
244
|
select: tuple[str, ...],
|
|
230
245
|
method: tuple[str, ...],
|
|
231
246
|
metric: str | None,
|
|
232
|
-
iterations: int,
|
|
247
|
+
iterations: int | None,
|
|
248
|
+
family_sweep: bool,
|
|
233
249
|
inject_effect: float | None,
|
|
234
250
|
scoring: str,
|
|
235
251
|
report_path: str | None,
|
|
@@ -246,7 +262,16 @@ def validate(
|
|
|
246
262
|
from abkit.cli.commands.validate import run_validate
|
|
247
263
|
|
|
248
264
|
run_validate(
|
|
249
|
-
select,
|
|
265
|
+
select,
|
|
266
|
+
method,
|
|
267
|
+
metric,
|
|
268
|
+
iterations,
|
|
269
|
+
inject_effect,
|
|
270
|
+
scoring,
|
|
271
|
+
report_path,
|
|
272
|
+
force,
|
|
273
|
+
profile,
|
|
274
|
+
family_sweep=family_sweep,
|
|
250
275
|
)
|
|
251
276
|
|
|
252
277
|
|
|
@@ -361,7 +361,13 @@ def run_experiment(
|
|
|
361
361
|
"show duplicate stabilization lines) — run `abk clean`"
|
|
362
362
|
)
|
|
363
363
|
|
|
364
|
-
|
|
364
|
+
# Heartbeat so a large pending series is not a silent multi-minute freeze
|
|
365
|
+
# (each look is one full-window warehouse query, + bootstrap resampling for
|
|
366
|
+
# bootstrap methods). Throttled to ~20 lines so a dense sub-day grid stays
|
|
367
|
+
# readable; the final look always prints.
|
|
368
|
+
n_pending = len(pending)
|
|
369
|
+
beat_every = max(1, n_pending // 20)
|
|
370
|
+
for look_index, cutoff in enumerate(pending, start=1):
|
|
365
371
|
loaded = backend.load_cutoff(comparison, metric, metric_sql, grid, cutoff)
|
|
366
372
|
outcomes = analyze_cutoff(
|
|
367
373
|
experiment,
|
|
@@ -394,6 +400,11 @@ def run_experiment(
|
|
|
394
400
|
),
|
|
395
401
|
)
|
|
396
402
|
outcome.results_written += tables.save_results(rows)
|
|
403
|
+
if n_pending > 1 and (look_index % beat_every == 0 or look_index == n_pending):
|
|
404
|
+
log(
|
|
405
|
+
f"LOOK {experiment.name}/{metric.name}: "
|
|
406
|
+
f"{look_index}/{n_pending} looks computed"
|
|
407
|
+
)
|
|
397
408
|
log(f"RESULT {experiment.name}/{metric.name}: " f"{outcome.results_written} rows total")
|
|
398
409
|
|
|
399
410
|
except BaseException as exc:
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";(()=>{var be={"--abk-page":"#f5f1e8","--abk-card":"#fbf9f3","--abk-ink":"#1b1916","--abk-ink-2":"#6e675b","--abk-muted":"#9a9384","--abk-border":"#e6e0d4","--abk-chart-bg":"#211e1a","--abk-chart-border":"#332f29","--abk-chart-ink":"#c9c2b4","--abk-chart-grid":"#9a9384","--abk-series-1":"#c9a6f0","--abk-series-2":"#8e76e0","--abk-st-good":"#1e9e6a","--abk-st-warn":"#e0a23b","--abk-st-serious":"#d6453d","--abk-st-critical":"#b23a6b","--abk-good-text":"#15774e","--abk-explore-accent":"#6a45c4"};function T(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()||be[e]||"#888"}function ze(e){let n=e.replace("#","").trim();n.length===3&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);let t=parseInt(n,16);return n.length!==6||Number.isNaN(t)?[137,135,129]:[t>>16&255,t>>8&255,t&255]}function H(e,n){let[t,a,d]=ze(e);return`rgba(${t},${a},${d},${n})`}function pe(e){let n=Math.max(1,window.devicePixelRatio||1),t=e.clientWidth||e.offsetWidth||0,a=e.clientHeight||e.offsetHeight||0;return e.width=Math.round(t*n),e.height=Math.round(a*n),n}function te(e,n,t,a){let d=()=>e.width-(n.l+n.r)*a,i=()=>e.height-(n.t+n.b)*a,p=()=>t.xmax-t.xmin||1,c=()=>t.vmax-t.vmin||1;return{px:u=>n.l*a+(u-t.xmin)/p()*d(),py:u=>e.height-n.b*a-(u-t.vmin)/c()*i(),xAt:u=>t.xmin+(u-n.l*a)/(d()||1)*p(),plotW:d,plotH:i}}function O(e,n,t){return{left:n.l*t,top:n.t*t,right:e.width-n.r*t,bottom:e.height-n.b*t}}var Z=Number.isFinite;function J(e,n,t,a,d,i,p,c,o,f,b,u,h){let s=n.length,x=Math.max(1,Math.round(p)),g=d-a||1,y=0;for(let v=0;v<s;v++){let M=t[v];!Z(M)||n[v]<a||n[v]>d||y++}e.strokeStyle=f,e.lineWidth=b*u,e.lineJoin="round",h&&e.setLineDash(h.map(v=>v*u)),e.beginPath();let C=[];if(y<=x){let v=_=>_>=0&&_<s&&Z(t[_])&&n[_]>=a&&n[_]<=d,M=!1;for(let _=0;_<s;_++){if(!v(_)){M=!1;continue}let L=c(n[_]),z=o(t[_]);if(!v(_-1)&&!v(_+1)){C.push([L,z]),M=!1;continue}M?e.lineTo(L,z):(e.moveTo(L,z),M=!0)}}else{let v=new Array(x).fill(null),M=new Array(x).fill(null);for(let L=0;L<s;L++){let z=t[L],V=n[L];if(!Z(z)||V<a||V>d)continue;let R=Math.floor((V-a)/g*(x-1));R=R<0?0:R>x-1?x-1:R,(v[R]===null||z<v[R])&&(v[R]=z),(M[R]===null||z>M[R])&&(M[R]=z)}let _=!1;for(let L=0;L<x;L++){if(M[L]===null){_=!1;continue}let z=i+L,V=o(M[L]),R=o(v[L]);_?e.lineTo(z,V):(e.moveTo(z,V),_=!0),e.lineTo(z,R)}}if(e.stroke(),h&&e.setLineDash([]),C.length>0){e.fillStyle=f,e.beginPath();for(let[v,M]of C)e.moveTo(v+Math.max(1.5,b)*u,M),e.arc(v,M,Math.max(1.5,b)*u,0,Math.PI*2);e.fill()}}function ue(e){let n=[],t=-1;for(let a=0;a<e.length;a++){let d=e[a];d.lo!==null&&d.hi!==null&&Z(d.lo)&&Z(d.hi)?t===-1&&(t=a):t!==-1&&(n.push([t,a-1]),t=-1)}return t!==-1&&n.push([t,e.length-1]),n}function fe(e,n,t,a,d,i,p,c,o,f){e.fillStyle=H(i,p);for(let[b,u]of t)if(b!==u){e.beginPath(),e.moveTo(a(n[b].x),d(n[b].hi));for(let h=b+1;h<=u;h++)e.lineTo(a(n[h].x),d(n[h].hi));for(let h=u;h>=b;h--)e.lineTo(a(n[h].x),d(n[h].lo));e.closePath(),e.fill()}e.strokeStyle=H(i,c),e.lineWidth=1*o,f&&e.setLineDash(f.map(b=>b*o));for(let[b,u]of t){if(b===u){let h=a(n[b].x),s=d(n[b].hi),x=d(n[b].lo),g=3*o;e.beginPath(),e.moveTo(h,s),e.lineTo(h,x),e.moveTo(h-g,s),e.lineTo(h+g,s),e.moveTo(h-g,x),e.lineTo(h+g,x),e.stroke();continue}for(let h of["hi","lo"]){e.beginPath();for(let s=b;s<=u;s++){let x=a(n[s].x),g=d(n[s][h]);s===b?e.moveTo(x,g):e.lineTo(x,g)}e.stroke()}}f&&e.setLineDash([])}function ie(e,n,t,a,d,i,p,c,o,f,b,u){e.font=`${11*b}px ui-monospace, Menlo, Consolas, monospace`,e.textBaseline="middle";for(let s=0;s<=4;s++){let x=a.vmin+(a.vmax-a.vmin)*s/4,g=i(x);e.strokeStyle=H(o,.1),e.lineWidth=1*b,e.beginPath(),e.moveTo(t.l*b,g),e.lineTo(n.width-t.r*b,g),e.stroke(),e.fillStyle=f,e.textAlign="right",e.fillText(E(x),(t.l-8)*b,g)}e.textBaseline="top";let h=c-p||1;for(let s=0;s<=5;s++){let x=p+h*s/5,g=d(x);e.fillStyle=f,e.textAlign=s===0?"left":s===5?"right":"center",e.fillText(u(x,h),g,n.height-(t.b-7)*b)}}function Q(e,n,t,a,d,i,p,c,o){let f=d(i),b=O(n,t,a);f<b.top-.5||f>b.bottom+.5||(e.strokeStyle=p,e.lineWidth=1.25*a,o&&e.setLineDash(o.map(u=>u*a)),e.beginPath(),e.moveTo(b.left,f),e.lineTo(b.right,f),e.stroke(),o&&e.setLineDash([]),c&&(e.fillStyle=p,e.textAlign="right",e.textBaseline="middle",e.font=`${10*a}px ui-monospace, Menlo, Consolas, monospace`,e.fillText(c,(t.l-8)*a,f)))}function we(e,n,t,a,d,i,p,c){let o=O(n,t,a),f=d(i);if(f<o.left-1||f>o.right+1)return;e.save(),e.strokeStyle=H(p,.7),e.lineWidth=1*a,e.setLineDash([4*a,4*a]),e.beginPath(),e.moveTo(f,o.top),e.lineTo(f,o.bottom),e.stroke(),e.setLineDash([]),e.fillStyle=H(p,.95),e.font=`${10*a}px ui-monospace, Menlo, Consolas, monospace`;let b=f+6*a+e.measureText(c).width<=o.right;e.textAlign=b?"left":"right",e.textBaseline="top",e.fillText(c,b?f+6*a:f-6*a,o.top+5*a),e.restore()}function me(e,n,t,a,d,i,p,c,o){let f=O(n,t,a),b=Math.max(f.left,Math.min(d(i),f.right)),u=Math.max(f.left,Math.min(d(p),f.right));u<=b&&u<f.left||(e.fillStyle=H(c,o),e.fillRect(b,f.top,Math.max(u-b,1*a),f.bottom-f.top))}function E(e){let n=Math.abs(e);return n>=1e3?e.toFixed(0):n>=10?e.toFixed(1):n>=1?e.toFixed(2):n>=.001||n===0?e.toFixed(3):e.toExponential(1)}function U(e){return(e>0?"+":"")+E(e)}function q(e){return e<.001?"<0.001":e.toFixed(3)}function ae(e,n){if(n<=2)return`${Math.round(e*24)}h`;let t=Math.round(e*10)/10;return`${Number.isInteger(t)?t.toFixed(0):t.toFixed(1)}d`}function re(e){return new Date(e).toISOString().slice(0,16).replace("T"," ")}function ee(e){return new Date(e).toISOString().slice(0,10)}var _e="<svg class='abk-logomark' viewBox='0 0 100 100' width='22' height='22' role='img' aria-label='abkit' focusable='false'><rect x='3' y='3' width='94' height='94' rx='26' fill='#6a45c4'/><g fill='none' stroke='#fbf9f3' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'><polyline points='13 50 34 50'/><polyline points='34 50 86 27'/><polyline points='34 50 86 61'/></g><circle cx='86' cy='27' r='7' fill='#fbf9f3'/></svg>";function $e(){let e=document.createElement("div");e.className="abk-brand",e.innerHTML=_e;let n=document.createElement("span");return n.className="abk-wordmark",n.textContent="abkit",e.appendChild(n),e}var r="abk-report",F={l:56,r:16,t:14,b:28},Pe=864e5,B=e=>String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),oe=(e,n,t)=>Math.max(n,Math.min(t,e));function l(e,n,t){let a=document.createElement(e);return n&&(a.className=n),t!==void 0&&(a.textContent=t),a}var G=e=>e===null?NaN:e,K=(e,n=E)=>e===null?"\u2014":n(e);function Ee(e,n){Ue(),n.classList.add(r),n.innerHTML="";let t=l("div","abk-root");n.appendChild(t);let a=[];t.appendChild(Ae(e)),e.warnings.length>0&&t.appendChild(He(e.warnings)),t.appendChild(Xe(e));let d=Be(e,a);d&&t.appendChild(d);for(let p of e.metrics)t.appendChild(Oe(p,e,a));e.metrics.length===0&&t.appendChild(l("div","abk-empty","No comparisons configured for this experiment."));for(let p of a)p.resize();let i=0;window.addEventListener("resize",()=>{i||(i=requestAnimationFrame(()=>{i=0;for(let p of a)p.resize()}))})}function Re(e){return e%86400===0?e/86400+"d":e%3600===0?e/3600+"h":e%60===0?e/60+"min":e+"s"}function Ae(e){let n=l("div","abk-header");n.appendChild($e());let t=e.project?`${B(e.project)} \xB7 ${B(e.experiment)}`:B(e.experiment),d=`${e.period.end>0?`${ee(e.period.start)} \u2013 ${re(e.period.end)} UTC`:`${ee(e.period.start)} UTC \u2013 (no cutoffs yet)`} \xB7 horizon ${ee(e.period.horizon)} (UTC) \xB7 cadence ${Re(e.cadence_seconds)} \xB7 tz ${B(e.tz)}`+(e.generated_at?` \xB7 generated ${B(e.generated_at)}`:""),i=l("div","abk-h-top"),p=l("h1","abk-title");p.innerHTML=t,i.appendChild(p),i.appendChild(l("div","abk-meta",d)),n.appendChild(i),e.description&&n.appendChild(l("p","abk-desc",e.description)),n.appendChild(l("div","abk-arms",`arms: ${e.arms.join(" vs ")} \xB7 first = control`));let c=l("div","abk-chips");return c.appendChild(Ne(e)),c.appendChild(De(e)),e.look!==null&&e.cadence_seconds<86400&&c.appendChild(l("span","abk-chip abk-look",`look ${e.look.n} / ~${e.look.planned} planned`)),n.appendChild(c),n}function Ne(e){let n=e.srm,t=e.arms.reduce((d,i)=>d+(n.observed[i]||0),0),a=l("span","abk-chip abk-srm");if(n.flag){let d=e.arms.map(o=>t>0?((n.observed[o]||0)/t).toFixed(2):"0.00").join("/"),i=e.arms.map(o=>{var f;return((f=n.expected[o])!=null?f:0).toFixed(2)}).join("/"),p=n.pvalue===null?"p=\u2014":`p${n.pvalue<.001?"<0.001":"="+q(n.pvalue)}`,c=n.kind==="sequential_multinomial"?"anytime-valid":"\u03C7\xB2";a.classList.add("abk-srm-fail"),a.textContent=`SRM FAILED (observed ${d} vs expected ${i}, ${c} ${p}) \u2014 effects untrustworthy`,a.setAttribute("data-abk-srm","fail")}else t===0?(a.textContent="SRM \u2014 no exposure data",a.setAttribute("data-abk-srm","na")):(a.textContent=`SRM ok (p=${K(n.pvalue,q)})`,a.classList.add("abk-srm-ok"),a.setAttribute("data-abk-srm","ok"));return a}function De(e){let n=l("span","abk-chip abk-calibration"),t=e.calibration;if(t==null)return n.textContent="uncalibrated \u2014 run `abk validate` (M4)",n.setAttribute("data-abk-calibration","empty"),n;if(typeof t.fpr!="number")return n.textContent=t.headline||"A/A ran \u2014 no method measurable",n.setAttribute("data-abk-calibration","failed"),n;let a=typeof t.headline=="string"&&t.headline||`calibrated / FPR=${(t.fpr*100).toFixed(1)}%`;return n.textContent=a,n.classList.add("abk-calibrated"),n.setAttribute("data-abk-calibration","present"),n}function He(e){let n=l("div","abk-warnings");for(let t of e)n.appendChild(l("div","abk-warning",`\u26A0 ${t}`));return n}var I=e=>e==null||Number.isNaN(e)?"\u2014":`${(e*100).toFixed(1)}%`,Fe=["method","FPR","peeking FPR","peeking (AV)","power","achieved MDE","coverage","exaggeration","\u03B1","verdict"];function Be(e,n){var f;let t=e.calibration,a=t==null?void 0:t.matrix_rows,d=!!a&&a.length>0;if(!t||!d&&!t.family)return null;let i=l("section","abk-calibration-matrix"),p=l("div","abk-cal-head");if(p.appendChild(l("h2","abk-cal-title","A/A false-positive matrix")),t.headline&&p.appendChild(l("div","abk-cal-headline",t.headline)),i.appendChild(p),t.family){let b=Ve(t.family);b&&i.appendChild(b)}if(!d)return i;let c=[],o={};for(let b of a){let u=(f=b.metric)!=null?f:"\u2014";o[u]||(o[u]=[],c.push(u)),o[u].push(b)}for(let b of c)i.appendChild(Ie(b,o[b],n));return i}function Ve(e){var p,c;if(e.fwer==null&&e.fdr==null)return null;let n=l("div","abk-cal-family");n.setAttribute("data-abk-family",e.over_budget?"over":"ok");let t=(p=e.n_metrics)!=null?p:e.metrics?e.metrics.length:0,a=(c=e.correction)!=null?c:"composed";n.appendChild(l("div","abk-cal-family-title",`Composed multiple testing \xB7 ${a} \xB7 ${t} metrics`));let d=l("div","abk-cal-family-stats"),i=(o,f,b)=>{let u=l("span",b?"abk-cal-family-stat abk-cal-fpr-over":"abk-cal-family-stat");u.appendChild(l("span","abk-cal-family-l",o)),u.appendChild(l("span","abk-cal-family-v",f)),d.appendChild(u)};if(i("family-wise error",I(e.fwer),e.over_budget),i("false-discovery rate",I(e.fdr)),e.fwer_peeking!=null&&e.fwer_sequential!=null){let o=e.budget!=null&&e.fwer_peeking>e.budget;i("peeking \u2192 always-valid",`${I(e.fwer_peeking)} \u2192 ${I(e.fwer_sequential)}`,o)}return e.budget!=null&&i("budget",I(e.budget)),n.appendChild(d),e.verdict&&n.appendChild(l("div","abk-cal-family-verdict",e.verdict)),n}function Ie(e,n,t){var o,f,b,u,h;let a=l("div","abk-cal-metric");a.appendChild(l("div","abk-cal-metric-name",e));let d=l("table","abk-cal-table"),i=l("tr");for(let s of Fe)i.appendChild(l("th",void 0,s));d.appendChild(i);for(let s of n){let x=l("tr");s.recommended&&x.classList.add("abk-cal-rec"),s.status&&s.status!=="success"&&x.classList.add("abk-cal-failed"),x.setAttribute("data-abk-calibration-row",s.recommended?"recommended":"cell");let g=l("td");g.appendChild(l("span",void 0,(o=s.method)!=null?o:"\u2014")),s.recommended&&g.appendChild(l("span","abk-cal-badge","Recommended")),s.note&&g.appendChild(l("div","abk-cal-rationale",s.note)),x.appendChild(g);let y=s.over_budget?"abk-cal-fpr-over":s.fpr!==null&&s.fpr!==void 0?"abk-cal-fpr-ok":void 0,C=l("td",y,I(s.fpr));s.budget!==null&&s.budget!==void 0&&(C.title=`budget ${I(s.budget)}`),x.appendChild(C),x.appendChild(l("td",void 0,I(s.peeking_fpr)));let v=l("td","abk-cal-av",I(s.peeking_fpr_sequential));s.ci_width!=null&&s.ci_width_sequential!=null&&(v.title=`CI width ${E(s.ci_width)} \u2192 ${E(s.ci_width_sequential)} (always-valid)`),x.appendChild(v),x.appendChild(l("td",void 0,I(s.power))),x.appendChild(l("td",void 0,s.achieved_mde==null?"\u2014":E(s.achieved_mde))),x.appendChild(l("td",void 0,I(s.coverage))),x.appendChild(l("td",void 0,s.effect_exaggeration==null?"\u2014":U(s.effect_exaggeration))),x.appendChild(l("td",void 0,s.alpha==null?"\u2014":q(s.alpha)));let M=l("td","abk-cal-verdict",(f=s.verdict)!=null?f:"");s.recommended&&s.rationale&&M.appendChild(l("div","abk-cal-rationale",`recommended \u2014 ${s.rationale}`)),x.appendChild(M),d.appendChild(x)}a.appendChild(d);let p=s=>!!s.peeking_curve&&s.peeking_curve.length>1,c=(b=n.find(s=>s.recommended&&p(s)))!=null?b:n.find(p);if(c&&c.peeking_curve){let s=c.peeking_curve,x=c.peeking_curve_sequential&&c.peeking_curve_sequential.length>1?c.peeking_curve_sequential:null,g=(u=c.alpha)!=null?u:null,y=[{label:"cumulative FPR",colorVar:"--abk-series-1"},{label:"nominal \u03B1",colorVar:"--abk-st-warn"}];x&&y.splice(1,0,{label:"always-valid",colorVar:"--abk-series-2"}),a.appendChild(ne(`peeking FPR vs looks \xB7 ${(h=c.method)!=null?h:""}`,y,t,(C,v)=>We(C,v,s,g,x),x?"optional-stopping hazard (blue) vs the always-valid CI (green), which holds the false-positive rate near \u03B1 at every look":"optional-stopping hazard: cumulative false-positive rate as an analyst peeks at more looks"))}return a}function We(e,n,t,a,d=null){let i=Math.max(1,window.devicePixelRatio||1);if(e.width===0||e.height===0)return;let p=t.map(g=>g[0]),c=t.map(g=>g[1]),o=p.filter(g=>Number.isFinite(g)),f=0,b=Math.max(1,...o),u=0;for(let g of c)Number.isFinite(g)&&g>u&&(u=g);a!==null&&Number.isFinite(a)&&a>u&&(u=a),u<=0&&(u=1);let h={xmin:f,xmax:b,vmin:0,vmax:u*1.15},s=te(e,j,h,i);n.fillStyle=T("--abk-chart-bg"),n.fillRect(0,0,e.width,e.height),ie(n,e,j,h,s.px,s.py,f,b,T("--abk-chart-grid"),T("--abk-muted"),i,ae);let x=O(e,j,i);if(n.save(),n.beginPath(),n.rect(x.left,x.top,s.plotW(),s.plotH()),n.clip(),a!==null&&Number.isFinite(a)&&Q(n,e,j,i,s.py,a,H(T("--abk-st-warn"),.85),"",[4,3]),J(n,p,c,f,b,x.left,s.plotW(),s.px,s.py,T("--abk-series-1"),1.75,i),d){let g=d.map(C=>C[0]),y=d.map(C=>C[1]);J(n,g,y,f,b,x.left,s.plotW(),s.px,s.py,T("--abk-series-2"),1.75,i)}n.restore()}function Xe(e){let n=l("div","abk-verdicts");if(e.verdicts.length===0)return n.appendChild(l("div","abk-empty","No verdict yet \u2014 no main-metric results persisted. Run `abk run` first.")),n;for(let t of e.verdicts)n.appendChild(je(t));return n}function je(e){let n=e.verdict.toLowerCase(),t=l("div",`abk-verdict abk-verdict-${n}`);t.setAttribute("data-abk-verdict",e.verdict);let a=l("div","abk-verdict-head");if(a.appendChild(l("span","abk-verdict-word",e.verdict)),a.appendChild(l("span","abk-verdict-target",`${e.metric} \u2014 ${e.pair.c} vs ${e.pair.t}`)),e.weekly_cycle_pct!=null){let c=Math.round(e.weekly_cycle_pct*100),o=l("span","abk-chip abk-weekly-chip",`covers ${c}% of a weekly cycle`);o.setAttribute("data-abk-weekly","1"),o.title="day-of-week effects may not be represented",a.appendChild(o)}t.appendChild(a);let d=l("div","abk-verdict-stats"),i=(c,o)=>{let f=l("span","abk-stat");f.appendChild(l("span","abk-stat-l",c)),f.appendChild(l("span","abk-stat-v",o)),d.appendChild(f)};if(i("effect",e.effect===null?"\u2014":U(e.effect)),i("CI",e.lo===null||e.hi===null?"\u2014":`[${E(e.lo)}, ${E(e.hi)}]`),i("p",K(e.pvalue,q)),i("\u03B1",K(e.alpha,c=>String(c))),e.mde!==null&&i("MDE",E(e.mde)),e.min_effect!==null&&i("min effect",E(e.min_effect)),e.elapsed_days!==null&&i("elapsed",`${E(e.elapsed_days)}d${e.is_horizon?" (at horizon)":" (pre-horizon)"}`),t.appendChild(d),e.rationale.length>0){let c=l("ul","abk-rationale");for(let o of e.rationale)c.appendChild(l("li",void 0,o));t.appendChild(c)}let p=e.weekly_cycle_pct!=null?e.caveats.filter(c=>!c.includes("of a weekly cycle")):e.caveats;if(p.length>0){let c=l("ul","abk-caveats");for(let o of p)c.appendChild(l("li","abk-caveat",`\u26A0 ${o}`));t.appendChild(c)}if(e.guardrails.length>0){let c=l("ul","abk-guardrails");for(let o of e.guardrails){let f=l("li",o.regressed?"abk-guardrail abk-guardrail-regressed":"abk-guardrail",`guardrail ${o.metric} (${o.pair.c} vs ${o.pair.t}): `+(o.regressed?`REGRESSED \u2014 effect ${o.effect===null?"\u2014":U(o.effect)}, desired ${o.desired_direction}`:"ok"));c.appendChild(f)}t.appendChild(c)}return t}function Oe(e,n,t){let a=l("section","abk-metric"),d=l("div","abk-metric-head"),i=l("div","abk-metric-name-row");i.appendChild(l("h2","abk-metric-name",e.name)),e.main&&i.appendChild(l("span","abk-badge abk-badge-main","main")),e.guardrail&&i.appendChild(l("span","abk-badge abk-badge-guardrail","guardrail")),d.appendChild(i),e.description&&d.appendChild(l("p","abk-metric-desc",e.description));let p=e.method,c=JSON.stringify(p.params),o=`${p.name} \xB7 params ${c}`+(p.alpha!==null?` \xB7 \u03B1=${p.alpha}`:"")+` \xB7 id ${p.id.slice(0,12)}\u2026`;d.appendChild(l("div","abk-method",o));for(let b of e.warnings)d.appendChild(l("div","abk-warning",`\u26A0 ${b}`));a.appendChild(d);let f=b=>{for(let u of n.verdicts)if(u.metric===e.name&&u.pair.c===b.c&&u.pair.t===b.t)return u;return null};for(let b of e.pairs)a.appendChild(qe(e,b,n,f(b),t));return a}function qe(e,n,t,a,d){let i=l("div","abk-pair");if(t.arms.length>2&&i.appendChild(l("h3","abk-pair-title",`${n.c} vs ${n.t}`)),n.series.length===0)return i.appendChild(l("div","abk-empty","No persisted cutoffs for this pair yet \u2014 run `abk run` first.")),i;let c=[...n.series].sort((y,C)=>y.t-C.t),o=(t.period.horizon-t.period.start)/Pe,f=c[c.length-1],b=c.reduce((y,C)=>y+C.ins,0);f.hz===0&&(i.setAttribute("data-abk-prehorizon","1"),i.appendChild(l("div","abk-note abk-prehorizon",`pre-horizon \u2014 fixed CIs are dashed/de-emphasized and not peeking-valid; planned horizon ${ee(t.period.horizon)} (${E(o)}d)`))),b>0&&i.appendChild(l("div","abk-note abk-insufficient",`${b} insufficient-data cutoff${b===1?"":"s"} greyed \u2014 counts + SRM only, no inference`));let u=l("div","abk-chart abk-chart-main"),h=document.createElement("canvas");u.appendChild(h),i.appendChild(u);let s=l("div","abk-readout","hover for a cutoff readout \xB7 scroll to zoom \xB7 drag to pan \xB7 double-click to reset");i.appendChild(s);let x=Ge(h,c,o,t,y=>{s.innerHTML=y});x!==null?d.push(x):u.replaceChildren(l("div","abk-chart-fallback","chart unavailable (no canvas 2D context)"));let g=l("div","abk-minis");return g.appendChild(ne("variant means",[{label:n.c,colorVar:"--abk-series-1"},{label:n.t,colorVar:"--abk-series-2"}],d,(y,C)=>le(y,C,c,o,[{y:v=>G(v.v1),colorVar:"--abk-series-1"},{y:v=>G(v.v2),colorVar:"--abk-series-2"},{y:v=>G(v.cv1),colorVar:"--abk-series-1",dash:[3,3]},{y:v=>G(v.cv2),colorVar:"--abk-series-2",dash:[3,3]}]),c.some(y=>y.cv1!==null||y.cv2!==null)?"dashed = CUPED covariate mean":void 0)),g.appendChild(ne("pair MDE",[],d,(y,C)=>le(y,C,c,o,[{y:v=>G(v.mde),colorVar:"--abk-series-1"}],{includeZero:!0,refLine:a!==null&&a.min_effect!==null?{v:a.min_effect,label:"min effect",colorVar:"--abk-st-warn"}:void 0}))),g.appendChild(ne("p-value vs \u03B1",[],d,(y,C)=>le(y,C,c,o,[{y:v=>G(v.p),colorVar:"--abk-series-1"}],{includeZero:!0,refLine:e.method.alpha!==null?{v:e.method.alpha,label:`\u03B1=${e.method.alpha}`,colorVar:"--abk-st-critical"}:void 0}))),g.appendChild(ne("avg group size",[],d,(y,C)=>le(y,C,c,o,[{y:v=>(v.s1+v.s2)/2,colorVar:"--abk-series-1"}],{includeZero:!0}))),i.appendChild(g),i.appendChild(Ke(c)),i}function Ge(e,n,t,a,d){let i=e.getContext("2d");if(!i)return null;let p=n.map(m=>m.ed===null?NaN:m.ed),c=n.map(m=>G(m.e)),o=m=>m.hz===1&&m.t>=a.period.horizon,f=n.findIndex(o),b=(m,k)=>({x:p[k],lo:m.lo,hi:m.hi}),u=[],h=[];n.forEach((m,k)=>{Number.isNaN(p[k])||(f===-1||k<f?u.push(b(m,k)):h.push(b(m,k)))}),f!==-1&&u.length>0&&h.length>0&&h.unshift(u[u.length-1]);let s=p.filter(m=>!Number.isNaN(m)),x=[];for(let m=1;m<s.length;m++)x.push(s[m]-s[m-1]);x.sort((m,k)=>m-k);let g=x.length>0?x[Math.floor(x.length/2)]:a.cadence_seconds/86400,y=m=>{let k=[];return n.forEach((w,$)=>{if(!m(w)||Number.isNaN(p[$]))return;let P=p[$]-g/2,S=p[$]+g/2,D=k[k.length-1];D&&P<=D[1]?D[1]=S:k.push([P,S])}),k},C=y(m=>m.ins===1),v=y(m=>m.blk===1&&m.ins===0),M=f!==-1&&n[f].ed!==null?n[f]:void 0,_=M!==void 0?M.ed:t,L=0,z=Math.max(_,t,...s,1),V=z-L||1,R=Math.min(Math.max(a.cadence_seconds/86400,V/200),V),ke=0,he=1;(function(){let k=1/0,w=-1/0,$=S=>{S!==null&&Number.isFinite(S)&&(S<k&&(k=S),S>w&&(w=S))};for(let S of n)$(S.e),$(S.lo),$(S.hi);(!Number.isFinite(k)||!Number.isFinite(w))&&(k=-1,w=1),k>0&&(k=0),w<0&&(w=0),w<=k&&(w=k+1);let P=(w-k)*.06;ke=k-P,he=w+P})();let N=L,W=z,A=1,Y=null,xe=()=>({xmin:N,xmax:W,vmin:ke,vmax:he}),Me=()=>te(e,F,xe(),A);function se(m,k){let w=k-m;if(w<R){let $=(m+k)/2;m=$-R/2,k=$+R/2,w=R}w>=V&&(m=L,k=z),m<L&&(k+=L-m,m=L),k>z&&(m-=k-z,k=z),N=oe(m,L,z),W=oe(k,L,z),ce()}let de=0;function ge(){de===0&&(de=requestAnimationFrame(ce))}function ce(){if(de=0,e.width===0||e.height===0)return;let m=Me(),k=T("--abk-chart-grid"),w=T("--abk-chart-ink"),$=T("--abk-series-1");i.fillStyle=T("--abk-chart-bg"),i.fillRect(0,0,e.width,e.height),ie(i,e,F,xe(),m.px,m.py,N,W,k,T("--abk-muted"),A,ae),Q(i,e,F,A,m.py,0,H(w,.6),""),i.save(),i.beginPath();let P=O(e,F,A);i.rect(P.left,P.top,m.plotW(),m.plotH()),i.clip();for(let[S,D]of C)D<N||S>W||me(i,e,F,A,m.px,S,D,T("--abk-muted"),.22);for(let[S,D]of v)D<N||S>W||me(i,e,F,A,m.px,S,D,T("--abk-st-critical"),.05);fe(i,u,ue(u),m.px,m.py,$,.07,.28,A,[4,4]),fe(i,h,ue(h),m.px,m.py,$,.13,.4,A),J(i,p,c,N,W,P.left,m.plotW(),m.px,m.py,$,2,A),we(i,e,F,A,m.px,_,k,"planned horizon \u2192"),Y!==null&&Se(m,P.top,m.plotH()),i.restore()}function Le(m){let k=-1,w=1/0;for(let $=0;$<p.length;$++){if(Number.isNaN(p[$]))continue;let P=Math.abs(p[$]-m);P<w&&(w=P,k=$)}return k}function Se(m,k,w){let $=Le(Y);if($<0)return;let P=p[$];if(P<N||P>W)return;let S=m.px(P);i.strokeStyle=H(T("--abk-chart-grid"),.45),i.lineWidth=1*A,i.setLineDash([2*A,2*A]),i.beginPath(),i.moveTo(S,k),i.lineTo(S,k+w),i.stroke(),i.setLineDash([]);let D=c[$];if(Number.isFinite(D)){let Ce=m.py(D);i.fillStyle=T("--abk-chart-bg"),i.beginPath(),i.arc(S,Ce,4*A,0,Math.PI*2),i.fill(),i.strokeStyle=T("--abk-series-1"),i.lineWidth=2*A,i.beginPath(),i.arc(S,Ce,4*A,0,Math.PI*2),i.stroke()}Te($)}function Te(m){let k=n[m],w=`<span class="abk-ro-t">${B(re(k.t))} (${k.ed===null?"\u2014":E(k.ed)+"d"})</span>`;if(k.ins===1)w+=`<span class="abk-ro-flag abk-insufficient">insufficient data \u2014 n\u2081=${k.s1}, n\u2082=${k.s2} \xB7 SRM ${k.blk===1?"FAILED":"ok"}</span>`;else{w+=`<span>effect ${k.e===null?"\u2014":B(U(k.e))}`,k.lo!==null&&k.hi!==null&&(w+=` [${B(E(k.lo))}, ${B(E(k.hi))}]`),w+="</span>",w+=`<span>p ${k.p===null?"\u2014":B(q(k.p))}</span>`,w+=`<span>n\u2081=${k.s1} n\u2082=${k.s2}</span>`,k.mde!==null&&(w+=`<span>MDE ${B(E(k.mde))}</span>`);let $=[];o(k)?$.push("at horizon"):$.push("pre-horizon"),k.blk===1&&$.push("SRM-blocked"),$.length>0&&(w+=`<span class="abk-ro-flag">${B($.join(" \xB7 "))}</span>`)}d(w)}function ve(m){let k=e.getBoundingClientRect(),w=(m-k.left-F.l)/(k.width-(F.l+F.r)||1);return N+oe(w,0,1)*(W-N)}e.addEventListener("wheel",m=>{m.preventDefault();let k=ve(m.clientX),w=W-N,$=oe(w*Math.pow(1.0015,m.deltaY),R,V),P=(k-N)/(w||1);se(k-P*$,k-P*$+$)},{passive:!1});let X=null;return e.addEventListener("mousedown",m=>{X={x:m.clientX,vMin:N,vMax:W},e.style.cursor="grabbing"}),window.addEventListener("mousemove",m=>{if(!X)return;let k=e.getBoundingClientRect(),w=(X.vMax-X.vMin)/(k.width-(F.l+F.r)||1),$=(m.clientX-X.x)*w;se(X.vMin-$,X.vMax-$)}),window.addEventListener("mouseup",()=>{X&&(X=null,e.style.cursor="crosshair")}),e.addEventListener("mousemove",m=>{X||(Y=ve(m.clientX),ge())}),e.addEventListener("mouseleave",()=>{Y!==null&&(Y=null,d("hover for a cutoff readout \xB7 scroll to zoom \xB7 drag to pan \xB7 double-click to reset"),ge())}),e.addEventListener("dblclick",()=>se(L,z)),e.style.cursor="crosshair",{resize(){A=pe(e),ce()}}}function ne(e,n,t,a,d){let i=l("div","abk-mini"),p=l("div","abk-mini-head");p.appendChild(l("span","abk-mini-title",e));for(let b of n){let u=l("span","abk-legend-item"),h=l("span","abk-swatch");h.style.background=T(b.colorVar),u.appendChild(h),u.appendChild(l("span",void 0,b.label)),p.appendChild(u)}i.appendChild(p),d&&i.appendChild(l("div","abk-mini-note",d));let c=l("div","abk-chart abk-chart-mini"),o=document.createElement("canvas");c.appendChild(o),i.appendChild(c);let f=o.getContext("2d");return f?(t.push({resize(){pe(o),a(o,f)}}),i):(c.replaceChildren(l("div","abk-chart-fallback","chart unavailable")),i)}var j={l:48,r:10,t:8,b:22};function le(e,n,t,a,d,i={}){let p=Math.max(1,window.devicePixelRatio||1);if(e.width===0||e.height===0)return;let c=t.map(C=>C.ed===null?NaN:C.ed),o=c.filter(C=>!Number.isNaN(C)),f=0,b=Math.max(a,...o,1),u=1/0,h=-1/0;for(let C of d)for(let v of t){let M=C.y(v);Number.isFinite(M)&&(M<u&&(u=M),M>h&&(h=M))}i.refLine&&(u=Math.min(u,i.refLine.v),h=Math.max(h,i.refLine.v)),(!Number.isFinite(u)||!Number.isFinite(h))&&(u=0,h=1),i.includeZero&&(u>0&&(u=0),h<0&&(h=0)),h<=u&&(h=u+1);let s=(h-u)*.08,x={xmin:f,xmax:b,vmin:u-s,vmax:h+s},g=te(e,j,x,p);n.fillStyle=T("--abk-chart-bg"),n.fillRect(0,0,e.width,e.height),ie(n,e,j,x,g.px,g.py,f,b,T("--abk-chart-grid"),T("--abk-muted"),p,ae);let y=O(e,j,p);n.save(),n.beginPath(),n.rect(y.left,y.top,g.plotW(),g.plotH()),n.clip(),i.refLine&&Q(n,e,j,p,g.py,i.refLine.v,H(T(i.refLine.colorVar),.85),"",[4,3]);for(let C of d){let v=t.map(M=>C.y(M));J(n,c,v,f,b,y.left,g.plotW(),g.px,g.py,T(C.colorVar),1.5,p,C.dash)}if(n.restore(),i.refLine&&i.refLine.label){Q(n,e,j,p,g.py,i.refLine.v,"rgba(0,0,0,0)",""),n.fillStyle=H(T(i.refLine.colorVar),.95),n.font=`${9*p}px ui-monospace, Menlo, Consolas, monospace`,n.textAlign="left",n.textBaseline="bottom";let C=g.py(i.refLine.v);C>y.top&&C<y.bottom&&n.fillText(i.refLine.label,y.left+4*p,C-2*p)}}function Ke(e){let n=document.createElement("details");n.className="abk-audit";let t=l("summary",void 0,`results table (${e.length} cutoffs)`);n.appendChild(t);let a=l("div","abk-audit-scroll"),d=document.createElement("table"),i=document.createElement("thead"),p=document.createElement("tr");for(let o of["cutoff (UTC)","d","effect","CI","p","reject","n\u2081","n\u2082","value\u2081","value\u2082","MDE","flags"])p.appendChild(l("th",void 0,o));i.appendChild(p),d.appendChild(i);let c=document.createElement("tbody");for(let o of e){let f=document.createElement("tr");o.ins===1&&(f.className="abk-insufficient");let b=[re(o.t),o.ed===null?"\u2014":E(o.ed),o.e===null?"\u2014":U(o.e),o.lo===null||o.hi===null?"\u2014":`[${E(o.lo)}, ${E(o.hi)}]`,K(o.p,q),o.rj===null?"\u2014":o.rj===1?"\u2713":"\u2717",String(o.s1),String(o.s2),K(o.v1),K(o.v2),K(o.mde),[o.hz===1?"horizon":"",o.blk===1?"SRM":"",o.ins===1?"insufficient":""].filter(Boolean).join(" \xB7 ")||"\u2014"];for(let u of b)f.appendChild(l("td",void 0,u));c.appendChild(f)}return d.appendChild(c),a.appendChild(d),n.appendChild(a),n}var ye=!1;function Ue(){if(ye)return;ye=!0;let n=`
|
|
2
|
+
:where(:root){${Object.entries(be).map(([a,d])=>`${a}:${d}`).join(";")};
|
|
3
|
+
--abk-sans:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
|
|
4
|
+
--abk-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;}
|
|
5
|
+
.${r}{font-family:var(--abk-sans);color:var(--abk-ink);background:var(--abk-page);}
|
|
6
|
+
.${r} *{box-sizing:border-box;}
|
|
7
|
+
.${r} .abk-root{max-width:1100px;margin:0 auto;padding:20px 18px 48px;}
|
|
8
|
+
/* header ------------------------------------------------------------------ */
|
|
9
|
+
.${r} .abk-header{margin-bottom:16px;padding-left:12px;border-left:3px solid var(--abk-series-1);}
|
|
10
|
+
.${r} .abk-brand{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
|
|
11
|
+
.${r} .abk-logomark{width:22px;height:22px;border-radius:6px;display:block;}
|
|
12
|
+
.${r} .abk-wordmark{font:700 15px var(--abk-sans);color:var(--abk-explore-accent);letter-spacing:-0.01em;}
|
|
13
|
+
.${r} .abk-h-top{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;}
|
|
14
|
+
.${r} .abk-title{font-size:21px;font-weight:700;margin:0;letter-spacing:-0.01em;}
|
|
15
|
+
.${r} .abk-meta{font-size:12px;color:var(--abk-ink-2);font-family:var(--abk-mono);}
|
|
16
|
+
.${r} .abk-desc{margin:8px 0 0;font-size:13px;color:var(--abk-ink-2);max-width:760px;line-height:1.5;}
|
|
17
|
+
.${r} .abk-arms{margin-top:6px;font-size:12px;color:var(--abk-ink-2);font-family:var(--abk-mono);}
|
|
18
|
+
/* chips -------------------------------------------------------------------- */
|
|
19
|
+
.${r} .abk-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
|
|
20
|
+
.${r} .abk-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;
|
|
21
|
+
background:var(--abk-card);border:1px solid var(--abk-border);border-radius:10px;
|
|
22
|
+
font-size:12px;font-family:var(--abk-mono);color:var(--abk-ink-2);}
|
|
23
|
+
.${r} .abk-srm-ok{border-color:var(--abk-st-good);}
|
|
24
|
+
.${r} .abk-srm-fail{background:var(--abk-st-critical);border-color:var(--abk-st-critical);
|
|
25
|
+
color:var(--abk-card);font-weight:700;}
|
|
26
|
+
.${r} .abk-calibration{border-style:dashed;}
|
|
27
|
+
.${r} .abk-calibrated{border-style:solid;border-color:var(--abk-st-good);}
|
|
28
|
+
.${r} .abk-weekly-chip{padding:2px 9px;font-size:11px;align-self:center;
|
|
29
|
+
border-color:var(--abk-st-warn);color:var(--abk-ink);
|
|
30
|
+
background:color-mix(in srgb, var(--abk-st-warn) 12%, transparent);}
|
|
31
|
+
/* warnings / notes ---------------------------------------------------------- */
|
|
32
|
+
.${r} .abk-warnings{margin:10px 0;}
|
|
33
|
+
.${r} .abk-warning{font-size:12px;color:var(--abk-ink);
|
|
34
|
+
background:color-mix(in srgb, var(--abk-st-warn) 14%, transparent);
|
|
35
|
+
border:1px solid var(--abk-st-warn);border-radius:8px;padding:6px 10px;margin:4px 0;}
|
|
36
|
+
.${r} .abk-note{font-size:12px;font-family:var(--abk-mono);border-radius:8px;
|
|
37
|
+
padding:5px 10px;margin:6px 0;border:1px dashed var(--abk-border);color:var(--abk-ink-2);}
|
|
38
|
+
.${r} .abk-note.abk-insufficient{background:color-mix(in srgb, var(--abk-muted) 12%, transparent);}
|
|
39
|
+
/* verdicts ------------------------------------------------------------------ */
|
|
40
|
+
.${r} .abk-verdicts{display:flex;flex-direction:column;gap:10px;margin:14px 0 22px;}
|
|
41
|
+
.${r} .abk-verdict{background:var(--abk-card);border:1px solid var(--abk-border);
|
|
42
|
+
border-left-width:4px;border-radius:10px;padding:12px 14px;}
|
|
43
|
+
.${r} .abk-verdict-win{border-left-color:var(--abk-st-good);}
|
|
44
|
+
.${r} .abk-verdict-lose{border-left-color:var(--abk-st-critical);}
|
|
45
|
+
.${r} .abk-verdict-flat{border-left-color:var(--abk-ink-2);}
|
|
46
|
+
.${r} .abk-verdict-inconclusive{border-left-color:var(--abk-st-warn);}
|
|
47
|
+
.${r} .abk-verdict-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;}
|
|
48
|
+
.${r} .abk-verdict-word{font-size:17px;font-weight:800;letter-spacing:0.02em;}
|
|
49
|
+
.${r} .abk-verdict-win .abk-verdict-word{color:var(--abk-good-text);}
|
|
50
|
+
.${r} .abk-verdict-lose .abk-verdict-word{color:var(--abk-st-critical);}
|
|
51
|
+
.${r} .abk-verdict-flat .abk-verdict-word{color:var(--abk-ink-2);}
|
|
52
|
+
.${r} .abk-verdict-inconclusive .abk-verdict-word{color:var(--abk-ink-2);}
|
|
53
|
+
.${r} .abk-verdict-target{font-size:13px;color:var(--abk-ink-2);font-family:var(--abk-mono);}
|
|
54
|
+
.${r} .abk-verdict-stats{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:8px;}
|
|
55
|
+
.${r} .abk-stat{display:inline-flex;gap:6px;font-size:12px;font-family:var(--abk-mono);}
|
|
56
|
+
.${r} .abk-stat-l{color:var(--abk-muted);}
|
|
57
|
+
.${r} .abk-stat-v{color:var(--abk-ink);font-weight:600;}
|
|
58
|
+
.${r} .abk-rationale{margin:8px 0 0;padding-left:20px;font-size:13px;color:var(--abk-ink-2);line-height:1.5;}
|
|
59
|
+
.${r} .abk-caveats{margin:8px 0 0;padding-left:20px;list-style:none;}
|
|
60
|
+
.${r} .abk-caveat{font-size:12.5px;color:var(--abk-ink);
|
|
61
|
+
background:color-mix(in srgb, var(--abk-st-warn) 14%, transparent);
|
|
62
|
+
border-radius:6px;padding:4px 8px;margin:3px 0;}
|
|
63
|
+
.${r} .abk-guardrails{margin:8px 0 0;padding-left:20px;font-size:12.5px;color:var(--abk-ink-2);}
|
|
64
|
+
.${r} .abk-guardrail-regressed{color:var(--abk-st-critical);font-weight:600;}
|
|
65
|
+
/* A/A calibration matrix (M4) ------------------------------------------------ */
|
|
66
|
+
.${r} .abk-calibration-matrix{margin:18px 0 26px;}
|
|
67
|
+
.${r} .abk-cal-head{margin-bottom:10px;}
|
|
68
|
+
.${r} .abk-cal-title{font-size:16px;font-weight:700;margin:0;}
|
|
69
|
+
.${r} .abk-cal-headline{margin-top:4px;font-size:12.5px;font-family:var(--abk-mono);color:var(--abk-ink-2);}
|
|
70
|
+
.${r} .abk-cal-family{margin:12px 0;padding:10px 12px;border:1px solid var(--abk-border);
|
|
71
|
+
border-radius:6px;background:var(--abk-card);}
|
|
72
|
+
.${r} .abk-cal-family[data-abk-family="over"]{border-color:var(--abk-st-critical);
|
|
73
|
+
background:color-mix(in srgb, var(--abk-st-critical) 6%, transparent);}
|
|
74
|
+
.${r} .abk-cal-family-title{font-size:13px;font-weight:600;color:var(--abk-ink);}
|
|
75
|
+
.${r} .abk-cal-family-stats{margin-top:6px;display:flex;flex-wrap:wrap;gap:16px;
|
|
76
|
+
font-family:var(--abk-mono);font-size:12px;}
|
|
77
|
+
.${r} .abk-cal-family-l{color:var(--abk-muted);margin-right:6px;}
|
|
78
|
+
.${r} .abk-cal-family-v{color:var(--abk-ink);font-weight:600;}
|
|
79
|
+
.${r} .abk-cal-family-verdict{margin-top:6px;font-size:12px;font-family:var(--abk-mono);color:var(--abk-ink-2);}
|
|
80
|
+
.${r} .abk-cal-metric{margin:14px 0;}
|
|
81
|
+
.${r} .abk-cal-metric-name{font-size:13px;font-weight:600;margin:0 0 6px;color:var(--abk-ink);}
|
|
82
|
+
.${r} .abk-cal-table{width:100%;border-collapse:collapse;font-size:12px;font-family:var(--abk-mono);}
|
|
83
|
+
.${r} .abk-cal-table th,.${r} .abk-cal-table td{border:1px solid var(--abk-border);
|
|
84
|
+
padding:5px 8px;text-align:left;vertical-align:top;}
|
|
85
|
+
.${r} .abk-cal-table th{background:var(--abk-card);color:var(--abk-ink-2);font-weight:600;white-space:nowrap;}
|
|
86
|
+
.${r} .abk-cal-rec{background:color-mix(in srgb, var(--abk-st-good) 8%, transparent);}
|
|
87
|
+
.${r} .abk-cal-rec td{font-weight:600;}
|
|
88
|
+
.${r} .abk-cal-fpr-over{color:var(--abk-st-critical);font-weight:700;}
|
|
89
|
+
.${r} .abk-cal-fpr-ok{color:var(--abk-good-text);}
|
|
90
|
+
.${r} .abk-cal-failed td{color:var(--abk-muted);font-style:italic;}
|
|
91
|
+
.${r} .abk-cal-badge{display:inline-block;font-size:10px;padding:1px 6px;border-radius:6px;
|
|
92
|
+
background:var(--abk-st-good);color:var(--abk-card);margin-left:6px;font-weight:700;letter-spacing:0.02em;}
|
|
93
|
+
.${r} .abk-cal-verdict{max-width:360px;white-space:normal;}
|
|
94
|
+
.${r} .abk-cal-rationale{font-size:11px;color:var(--abk-ink-2);margin-top:2px;font-style:normal;}
|
|
95
|
+
/* metric sections ------------------------------------------------------------ */
|
|
96
|
+
.${r} .abk-metric{margin:26px 0;}
|
|
97
|
+
.${r} .abk-metric-name-row{display:flex;align-items:baseline;gap:10px;}
|
|
98
|
+
.${r} .abk-metric-name{font-size:16px;font-weight:700;margin:0;}
|
|
99
|
+
.${r} .abk-badge{font-size:10px;font-family:var(--abk-mono);text-transform:uppercase;
|
|
100
|
+
letter-spacing:0.06em;padding:2px 7px;border-radius:8px;border:1px solid var(--abk-border);color:var(--abk-ink-2);}
|
|
101
|
+
.${r} .abk-badge-main{border-color:var(--abk-series-1);color:var(--abk-series-1);}
|
|
102
|
+
.${r} .abk-badge-guardrail{border-color:var(--abk-st-serious);color:var(--abk-st-serious);}
|
|
103
|
+
.${r} .abk-metric-desc{margin:4px 0 0;font-size:12.5px;color:var(--abk-ink-2);max-width:760px;}
|
|
104
|
+
.${r} .abk-method{margin-top:4px;font-size:11.5px;color:var(--abk-muted);font-family:var(--abk-mono);
|
|
105
|
+
overflow-wrap:anywhere;}
|
|
106
|
+
.${r} .abk-pair{margin:12px 0 20px;}
|
|
107
|
+
.${r} .abk-pair-title{font-size:13px;font-weight:600;margin:10px 0 6px;color:var(--abk-ink-2);
|
|
108
|
+
font-family:var(--abk-mono);}
|
|
109
|
+
/* charts ---------------------------------------------------------------------- */
|
|
110
|
+
.${r} .abk-chart{position:relative;width:100%;background:var(--abk-chart-bg);
|
|
111
|
+
border:1px solid var(--abk-chart-border);border-radius:12px;overflow:hidden;}
|
|
112
|
+
.${r} .abk-chart canvas{width:100%;height:100%;display:block;}
|
|
113
|
+
.${r} .abk-chart-main{height:340px;margin-top:8px;}
|
|
114
|
+
.${r} .abk-chart-mini{height:150px;}
|
|
115
|
+
.${r} .abk-chart-fallback{color:var(--abk-chart-ink);font-size:12px;padding:20px;
|
|
116
|
+
font-family:var(--abk-mono);}
|
|
117
|
+
.${r} .abk-readout{min-height:20px;margin-top:6px;font-size:11px;color:var(--abk-ink-2);
|
|
118
|
+
font-family:var(--abk-mono);display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;}
|
|
119
|
+
.${r} .abk-ro-t{font-weight:700;color:var(--abk-ink);}
|
|
120
|
+
.${r} .abk-ro-flag{color:var(--abk-muted);}
|
|
121
|
+
.${r} .abk-readout .abk-insufficient{color:var(--abk-ink);
|
|
122
|
+
background:color-mix(in srgb, var(--abk-muted) 16%, transparent);
|
|
123
|
+
border-radius:6px;padding:2px 6px;}
|
|
124
|
+
/* small multiples -------------------------------------------------------------- */
|
|
125
|
+
.${r} .abk-minis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
|
|
126
|
+
gap:10px;margin-top:10px;}
|
|
127
|
+
.${r} .abk-mini-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-bottom:4px;}
|
|
128
|
+
.${r} .abk-mini-title{font-size:11px;font-weight:600;color:var(--abk-muted);
|
|
129
|
+
font-family:var(--abk-mono);letter-spacing:0.06em;}
|
|
130
|
+
.${r} .abk-legend-item{display:inline-flex;align-items:center;gap:5px;font-size:11px;
|
|
131
|
+
color:var(--abk-ink-2);font-family:var(--abk-mono);}
|
|
132
|
+
.${r} .abk-swatch{width:10px;height:10px;border-radius:2px;display:inline-block;}
|
|
133
|
+
.${r} .abk-mini-note{font-size:10.5px;color:var(--abk-muted);font-family:var(--abk-mono);
|
|
134
|
+
margin-bottom:4px;}
|
|
135
|
+
/* audit table -------------------------------------------------------------------- */
|
|
136
|
+
.${r} .abk-audit{margin-top:10px;}
|
|
137
|
+
.${r} .abk-audit summary{font-size:12px;color:var(--abk-ink-2);cursor:pointer;
|
|
138
|
+
font-family:var(--abk-mono);}
|
|
139
|
+
.${r} .abk-audit-scroll{overflow-x:auto;margin-top:8px;}
|
|
140
|
+
.${r} .abk-audit table{border-collapse:collapse;font-size:11.5px;font-family:var(--abk-mono);
|
|
141
|
+
min-width:720px;font-variant-numeric:tabular-nums;}
|
|
142
|
+
.${r} .abk-audit th{text-align:left;color:var(--abk-muted);font-weight:600;
|
|
143
|
+
border-bottom:1px solid var(--abk-border);padding:4px 10px 4px 0;white-space:nowrap;}
|
|
144
|
+
.${r} .abk-audit td{border-bottom:1px solid var(--abk-border);padding:4px 10px 4px 0;
|
|
145
|
+
white-space:nowrap;color:var(--abk-ink-2);}
|
|
146
|
+
.${r} .abk-audit tr.abk-insufficient td{color:var(--abk-muted);
|
|
147
|
+
background:color-mix(in srgb, var(--abk-muted) 8%, transparent);}
|
|
148
|
+
/* empty states --------------------------------------------------------------------- */
|
|
149
|
+
.${r} .abk-empty{font-size:13px;color:var(--abk-ink-2);background:var(--abk-card);
|
|
150
|
+
border:1px dashed var(--abk-border);border-radius:10px;padding:14px;}
|
|
151
|
+
`,t=document.createElement("style");t.setAttribute("data-abk-report",""),t.textContent=n,document.head.appendChild(t)}window.__ABK_REPORT__={render:Ee};})();
|