Orchestration and reference app layer for ML4U chapter examples
Project description
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:
- Core Layer: Domain objects, configs, and pipelines that compose Smith libraries
- API Layer: Stable public interface with user-friendly entrypoints
- CLI Layer: Terminal interface for running pipelines
- 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
- Architecture - System design and layer organization
- How to Run - Detailed usage instructions
- Data Formats - Input data requirements
- Chapter Examples - Chapter-specific examples
Design Principles
- No new algorithms: GridSmith orchestrates existing Smith libraries
- Pure orchestration: Core layer composes, doesn't compute
- Stable API: Public interface hides internal structure
- Runnable examples: Every chapter has a working example
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gridsmith-0.1.1.tar.gz.
File metadata
- Download URL: gridsmith-0.1.1.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2e0fe0722dbb6de908a99f76173b61e40c2218aaa850527cebaf4368f5dbd8e
|
|
| MD5 |
e1bcca4273e3ab957ee853ac35e27157
|
|
| BLAKE2b-256 |
4d5dabb8b267a0e6cefcfaa5f4c844d780646cb6c0fa8f8fc725bb8d4dfbf1c3
|
Provenance
The following attestation bundles were made for gridsmith-0.1.1.tar.gz:
Publisher:
release.yml on kylejones200/gridsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gridsmith-0.1.1.tar.gz -
Subject digest:
f2e0fe0722dbb6de908a99f76173b61e40c2218aaa850527cebaf4368f5dbd8e - Sigstore transparency entry: 813376922
- Sigstore integration time:
-
Permalink:
kylejones200/gridsmith@200274b1058b928c8113c4207b69090f3753e410 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kylejones200
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@200274b1058b928c8113c4207b69090f3753e410 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gridsmith-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gridsmith-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
774e79e582ddc0ea2a0227d43d29c99840f2545b7a1e8d177cc44b27cc646ffe
|
|
| MD5 |
3132cd0315310d07c2ef25e5d4a76d0a
|
|
| BLAKE2b-256 |
3707520982723b272ee2f4df9133f5da38393d61f20046178a56161665c86754
|
Provenance
The following attestation bundles were made for gridsmith-0.1.1-py3-none-any.whl:
Publisher:
release.yml on kylejones200/gridsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gridsmith-0.1.1-py3-none-any.whl -
Subject digest:
774e79e582ddc0ea2a0227d43d29c99840f2545b7a1e8d177cc44b27cc646ffe - Sigstore transparency entry: 813376928
- Sigstore integration time:
-
Permalink:
kylejones200/gridsmith@200274b1058b928c8113c4207b69090f3753e410 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/kylejones200
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@200274b1058b928c8113c4207b69090f3753e410 -
Trigger Event:
push
-
Statement type: