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
  • 74%+ 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.1.tar.gz (37.8 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.1-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liftlens-0.1.1.tar.gz
  • Upload date:
  • Size: 37.8 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.1.tar.gz
Algorithm Hash digest
SHA256 4b8a7c7a522bf99cbd76d7f7b72de5a7ac9a2cca8986ee6a6534554dd574d0e4
MD5 9cb4d3a2c910e8b0bd55d0443fbb8278
BLAKE2b-256 f7fcebef36a63797e4d67b636fd75e8f6bb4ff29f55d8219d85fdfc1b24962e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: liftlens-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 50.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99f32aa579f18535f0b423a0e73d4bbb80cb4989d68db16c3f80ae24767455b4
MD5 8f8e4e73cb8b7e88ececb122088f962f
BLAKE2b-256 4c8db5303e21fec22b7bcc5d90e76d21ee6b8283845a05e1a59cccfec39e5316

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