Metadata-Version: 2.4
Name: dml-dev
Version: 0.1.2
Summary: DoubleML build, estimation, plotting, and utility pipelines.
Author: DML Pipeline Contributors
Project-URL: Repository, https://github.com/coreygb1/dml-dev
Keywords: administrative-data,causal-inference,doubleml,observational-data,program-evaluation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: doubleml
Requires-Dist: joblib
Requires-Dist: lightgbm
Requires-Dist: optuna
Requires-Dist: oi-tools[figures]
Requires-Dist: plotnine
Requires-Dist: polars
Requires-Dist: pyarrow
Requires-Dist: psutil
Requires-Dist: PyYAML
Requires-Dist: scikit-learn
Requires-Dist: shap
Requires-Dist: threadpoolctl
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"

# DML Pipeline

Reusable build, estimation, plotting, and utility code for DoubleML-style
program evaluation workflows.

The package keeps project-specific configuration in `project_config/` and
reusable pipeline code in `dml_code/`. The published distribution includes the
code under `dml_code/src` and `dml_code/pipeline`, plus the example project
configuration files.

## Install

```bash
pip install dml-dev
```

For local development from a checkout:

```bash
python -m pip install -e '.[dev]'
```

## Commands

After installation, the package exposes two command line entrypoints:

```bash
dml-build example_program
dml-estimate synthetic_example
```

The same steps can also be run as modules:

```bash
python -m dml_code.pipeline.step1_build example_program
python -m dml_code.pipeline.step2_estimate synthetic_example
```

## Workflow

1. Build an analysis dataset from source parquet files and program registry
   entries.
2. Estimate treatment effects from a YAML experiment definition.
3. Write raw logs, diagnostics, plots, and tables to the configured output
   locations.

```text
project_config/ + source data
        |
        v
dml_code.pipeline.step1_build
        |
        v
processed analysis data
        |
        v
dml_code.pipeline.step2_estimate
        |
        v
outputs/raw, outputs/plots, outputs/tables
```

## Project Configuration

Most project setup happens in `project_config/`.

- `project_config/build_spec.py`: databank inputs, columns to carry through,
  relative-time columns, and generated features.
- `project_config/registries/programs.py`: program LazyFrames with canonical
  join, treatment, and observation columns.
- `project_config/registries/covariate_sets.py`: reusable covariate lists and
  categorical covariate declarations.
- `project_config/registries/filter_sets.py`: reusable dataframe filters.
- `project_config/registries/models.py`: named outcome and propensity learners.
- `project_config/experiments/*.yaml`: experiment definitions for estimation.

The reusable implementation lives in:

- `dml_code/pipeline/`: runnable build and estimation steps.
- `dml_code/src/`: shared helpers for building, estimating, paths, outputs, and
  logging.

## Publishing Check

Build and validate the package locally with:

```bash
python -m build
python -m twine check dist/*
```
