Skip to main content

An Enterprise-grade A/B Testing Framework with CUPED, SRM, Sequential Testing, FastAPI, Streamlit

Reason this release was yanked:

bugs

Project description

liftlens logo

liftlens

Confirm the lift before you launch using liftlens, an enterprise-grade A/B testing platform with:

  • CUPED, SRM detection, sequential testing (OBF/Pocock)
  • Heterogeneous treatment effects (Causal Forest, S/X/T-Learner)
  • FastAPI + JWT auth, Streamlit dashboard
  • Parallel execution (Joblib/Dask/Ray)
  • Interactive HTML/PDF reports with Plotly
  • SQLite experiment registry
  • 95%+ test coverage, CI/CD ready

Quick Start

# 1. Clone & install
git clone https://github.com/dare-afolabi/liftlens.git
cd liftlens
poetry install --with dev,docs

# 2. Generate synthetic data
poetry run generate-synthetic --n_users 10000 --output data/synthetic.csv

# 3. Run experiment
poetry run liftlens run \
  --config examples/revenue_test.yaml \
  --output output/run_1

# 4. Launch API + Dashboard
docker-compose up
  • API: http://localhost:8000/docs
  • Dashboard: http://localhost:8501
  • Report: output/run_1/report.html

Configuration (YAML)

# examples/revenue_test.yaml
name: Revenue Lift Test
data:
  type: csv
  path: data/synthetic.csv
baseline_col: baseline
outcome_col: outcome
group_col: group
metrics:
  - name: revenue_lift
    func: mean_diff
  - name: arpu
    func: ratio_metric
    params:
      denominator_col: active_users
transform:
  winsorize: [0.01, 0.01]
  cuped: true
  log_transform: true
stats:
  sequential: true
  method: obf

Features

  • CUPED Variance Reduction
  • SRM Detection (Chi²)
  • Sequential Testing (OBF/Pocock)
  • Bootstrap + Permutation Tests
  • Multiple Comparison Corrections
  • Heterogeneous Treatment Effects
  • ANCOVA, Mixed Effects, GAM
  • FastAPI + API Key Auth
  • Streamlit Dashboard
  • HTML/PDF Reports (Jinja2 + WeasyPrint)
  • Parallel Processing
  • SQLite Registry
  • Docker Compose

Project Structure

liftlens/
├── core/           # Session, registry
├── config/         # Pydantic schemas
├── data/           # IO, validation, transforms
├── metrics/        # Primary, robust, composite
├── stats/          # Inference, power, sequential, HTE
├── viz/            # Plotly: dist, effects, diagnostics
├── report/         # Jinja2 templates + builder
├── workflows/      # Pipeline, presets
├── engine/         # Parallel execution
├── api/            # FastAPI, Streamlit, auth
├── utils/          # Logging, decorators
└── cli.py          # Typer CLI

Development

# Install pre-commit
poetry run pre-commit install

# Run tests
poetry run pytest -m "not slow"

# Lint & format
poetry run ruff check .
poetry run black .

# Build docs
poetry run mkdocs serve

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liftlens-0.1.0.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liftlens-0.1.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

Details for the file liftlens-0.1.0.tar.gz.

File metadata

  • Download URL: liftlens-0.1.0.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for liftlens-0.1.0.tar.gz
Algorithm Hash digest
SHA256 15db3173321677f6404fd0e0237b413eea5e0229c23cd48757717b4dac4f1eef
MD5 a336ec1aaaab36fe6b5cffd0ec09bf57
BLAKE2b-256 abd7496951a2ade26d134dcbb045c9eabf2c65e6d1776a8c91af75bc71d56e70

See more details on using hashes here.

File details

Details for the file liftlens-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: liftlens-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 50.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for liftlens-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05536f5531b714138929b5c9fa3af6ac4ea90940c20f3c2c05fa61c430d7c708
MD5 502ce1172c9fce1878b16ce02cbde892
BLAKE2b-256 5554c088250bc033d453a592a7931145de39669af210d3a5fd0bf91154b9be5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page