Skip to content

Repository files navigation

PipelineForge

A modular, production-grade Data Science framework for end-to-end machine learning workflows.

Python License


Features

  • Data loading — CSV, Excel, Parquet with auto-detection
  • Validation — typed validators with composable result accumulation
  • Preprocessing — cleaning, imputation, encoding, scaling, selection
  • Feature engineering — generators, transformers, interactions, statistical selection (VIF, correlation)
  • Model selection — train/test split, stratified, K-Fold, time-series CV
  • Models — classifier and regressor registries backed by scikit-learn
  • Evaluation — classification and regression metrics, confusion matrix, reports
  • Visualization — distribution, correlation heatmap, feature importance, residuals
  • Orchestration — end-to-end classification and regression pipelines
  • Experiment tracking — lightweight JSON-backed tracker with run comparison
  • CLIpipelineforge classify and pipelineforge regress commands

Installation

# Core
uv add pipelineforge

# With dev tools
uv sync --extra dev

# With statistical extras (VIF, statsmodels)
uv sync --extra dev --extra stats

Quick Start — Python API

Classification

import pandas as pd
from pipelineforge.orchestration import run_classification_pipeline

df = pd.read_csv("data/raw/dataset.csv")

result = run_classification_pipeline(
    dataframe=df,
    target_column="target",
    model_type="random_forest",
    test_size=0.2,
    random_state=42,
)

print(result.metrics)
# {'accuracy': 0.91, 'precision': 0.90, 'recall': 0.91, 'f1': 0.90}

Regression

from pipelineforge.orchestration import run_regression_pipeline

result = run_regression_pipeline(
    dataframe=df,
    target_column="price",
    model_type="linear_regression",
)

print(result.metrics)
# {'mae': 1.23, 'mse': 2.45, 'rmse': 1.56, 'r2': 0.94, 'mape': 0.08}

Quick Start — CLI

# Classification
pipelineforge classify --data data.csv --target survived

# Regression
pipelineforge regress --data data.csv --target price

# With options
pipelineforge classify \
    --data data.csv \
    --target survived \
    --model logistic_regression \
    --test-size 0.2 \
    --output outputs/result.json

# With experiment tracking
pipelineforge classify \
    --data data.csv \
    --target survived \
    --track \
    --tracking-store outputs/tracking.json \
    --experiment titanic_experiment

Experiment Tracking

from pipelineforge.tracking import ExperimentTracker
from pipelineforge.orchestration import run_classification_pipeline

tracker = ExperimentTracker("titanic", storage_path="outputs/tracking.json")

result = run_classification_pipeline(df, target_column="survived")
run_id = tracker.log_run(result)

# Compare runs
df_compare = tracker.compare_runs([run_id_1, run_id_2])

# Best run
best = tracker.best_run("accuracy", higher_is_better=True)

Project Structure

pipelineforge/
├── cli/                    # CLI entrypoints
├── config/                 # TOML configuration loader
├── core/                   # Logging, paths
├── data/                   # Loaders, validation
├── evaluation/             # Classification + regression metrics
├── exceptions/             # Framework exception hierarchy
├── features/               # Generator, transformer, interaction, selector
├── model_selection/        # Splitters (train/test, kfold, timeseries)
├── models/                 # Classifier + regressor registries
├── orchestration/          # End-to-end pipelines + PipelineResult
├── preprocessing/          # Cleaner, imputer, encoder, scaler, selector
├── tracking/               # ExperimentTracker + JSON store
└── visualization/          # Plots (distribution, heatmap, residuals, etc.)

Development Setup

git clone git@github.com:RaazSareen/pipelineforge.git
cd pipelineforge
uv sync --extra dev --extra stats

Running Tests

uv run pytest -v

362 tests across all layers.


Linting and Formatting

uv run ruff check . --fix
uv run ruff format .
uv run pre-commit run --all-files

Available Models

Classifiers

Key Model
random_forest RandomForestClassifier
logistic_regression LogisticRegression
gradient_boosting GradientBoostingClassifier

Regressors

Key Model
random_forest RandomForestRegressor
linear_regression LinearRegression
gradient_boosting GradientBoostingRegressor
ridge Ridge

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new functionality
  4. Ensure all tests pass and ruff is clean
  5. Submit a pull request

License

MIT License. See LICENSE for details.


Versioning

PipelineForge follows Semantic Versioning.

Current version: 1.0.0

About

Modular Python framework for data engineering and analytics workflows — ETL pipelines, reproducible environments, automation, and CI/CD.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages