Skip to main content

GridSmith

Orchestration and reference app layer for ML4U (Machine Learning for Utilities) chapter examples.

Overview

GridSmith provides a clean, layered architecture for running ML4U chapter examples. It composes algorithms from the Smith library ecosystem (timesmith, anomsmith, geosmith, ressmith, plotsmith) without implementing new algorithms itself.

Architecture

GridSmith is organized into four layers:

  1. Core Layer: Domain objects, configs, and pipelines that compose Smith libraries
  2. API Layer: Stable public interface with user-friendly entrypoints
  3. CLI Layer: Terminal interface for running pipelines
  4. Examples Layer: Runnable chapter examples with documentation

Quick Start

Installation

Basic installation:

pip install gridsmith

With Smith libraries (recommended for full functionality):

pip install gridsmith[smith]
# or
pip install -r requirements-smith.txt

Running a Pipeline

Using the CLI:

gridsmith run ami-anomaly --config configs/ami_anomaly.yaml

Using Python:

from gridsmith import GridSmithClient
from gridsmith.api.config import AMIAnomalyConfig

client = GridSmithClient()
config = AMIAnomalyConfig(
    input_path="data/ami_data.csv",
    output_dir="runs/output",
)

results = client.ami_anomaly(config)

Available Pipelines

GridSmith provides machine learning pipelines for utility operations. Here are the available pipelines:

Core Applications (Part II)

  • ami-anomaly: AMI anomaly detection
  • temperature-load: Temperature-to-load modeling
  • ml-fundamentals: Regression, classification, clustering
  • load-forecasting: Load forecasting with ARIMA/LSTM
  • predictive-maintenance: Asset health monitoring
  • outage-prediction: Storm outage prediction
  • grid-optimization: Grid optimization with RL
  • der-forecasting: Distributed energy resource forecasting
  • demand-response: Customer load profiling

Advanced Techniques (Part III)

  • computer-vision: Vegetation detection, PLD
  • nlp: Log classification, entity extraction
  • ai-utilities: LLM integration
  • geospatial: Feeder mapping, asset location

Integration & Scale (Part IV)

  • mlops: MLflow integration, model registry
  • cybersecurity: Threat detection
  • ethics: Fairness auditing
  • roi-analysis: Cost-benefit analysis
  • realtime-analytics: Streaming analytics
  • compliance: SAIDI/SAIFI reporting
  • feature-engineering: Temporal, geospatial features
  • reliability: Reliability analytics
  • market-operations: Price forecasting, bidding

Advanced Research

  • causal-inference: Difference-in-differences, synthetic control
  • multi-task-learning: MTL models

See Documentation for more details.

Project Structure

gridsmith/
├── src/gridsmith/
│   ├── core/          # Layer 1: Domain objects and pipelines
│   ├── api/           # Layer 2: Public interface
│   └── cli/           # Layer 3: Command-line interface
├── examples/          # Layer 4: Chapter examples
├── configs/           # Configuration files
├── docs/              # Documentation
└── tests/             # Test suite

Development

Setup

git clone <repository>
cd gridsmith
pip install -e ".[dev]"

Running Tests

pytest

Linting

ruff check .

Type Checking

mypy src/gridsmith

Documentation

Design Principles

  1. No new algorithms: GridSmith orchestrates existing Smith libraries
  2. Pure orchestration: Core layer composes, doesn't compute
  3. Stable API: Public interface hides internal structure
  4. Runnable examples: Every chapter has a working example
  5. Testable: Golden tests validate schema and metrics

Definition of Done

  • ✅ Can run one command from a clean venv
  • ✅ Get metrics, tables, and figures in a run folder
  • ✅ README explains inputs and outputs
  • ✅ Test asserts schema and metric keys

Integration Policy

GridSmith integrates with the Smith library ecosystem:

  • timesmith: Time series forecasting and analysis
  • anomsmith: Anomaly detection
  • plotsmith: Data visualization

GridSmith uses graceful fallback - it works with or without Smith libraries installed:

  • Attempts to use Smith libraries when available
  • Falls back to local implementations if libraries are missing
  • Supports multiple API patterns for maximum compatibility

See Integration Guide for details.

Dependencies

GridSmith depends on Smith libs by version:

  • Pin minimal versions
  • Avoid tight coupling to internal modules
  • Import from public APIs only
  • Graceful degradation if libraries unavailable

License

MIT License

Metadata

Release files for gridsmith 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gridsmith 0.1.1
File Size Uploaded Provenance Actions
gridsmith-0.1.1.tar.gz 27.6 kB With provenance Details for gridsmith-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gridsmith 0.1.1
File Interpreter ABI Platform Actions
gridsmith-0.1.1-py3-none-any.whl Python 3 none any Details for gridsmith-0.1.1-py3-none-any.whl

Total release size: 53.8 kB

Release files / gridsmith-0.1.1.tar.gz

Download URL gridsmith-0.1.1.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f2e0fe0722dbb6de908a99f76173b61e40c2218aaa850527cebaf4368f5dbd8e
BLAKE2b-256 checksum
How to use checksums
4d5dabb8b267a0e6cefcfaa5f4c844d780646cb6c0fa8f8fc725bb8d4dfbf1c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.

Transparency log

Release files / gridsmith-0.1.1-py3-none-any.whl

Download URL gridsmith-0.1.1-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
774e79e582ddc0ea2a0227d43d29c99840f2545b7a1e8d177cc44b27cc646ffe
BLAKE2b-256 checksum
How to use checksums
3707520982723b272ee2f4df9133f5da38393d61f20046178a56161665c86754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.

Transparency log

Security for gridsmith 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gridsmith-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page