Skip to main content

Adapter layer for third-party forecasting libraries in Electric Barometer

Project description

Electric Barometer Adapters (eb-adapters)

License: BSD-3-Clause Python Versions Docs Project Status

This repository contains the model adapter layer of the Electric Barometer ecosystem.

eb-adapters provides standardized interfaces that adapt common forecasting and machine-learning libraries to the Electric Barometer evaluation and readiness frameworks, enabling consistent metric computation and model comparison across heterogeneous modeling approaches.

Conceptual definitions and evaluation philosophy are maintained in the companion research repository: eb-papers.


Naming convention

Electric Barometer packages follow standard Python packaging conventions:

  • Distribution names (used with pip install) use hyphens
    e.g. pip install eb-adapters
  • Python import paths use underscores
    e.g. import eb_adapters

This distinction is intentional and consistent across the Electric Barometer ecosystem.


Role Within Electric Barometer

Within the Electric Barometer ecosystem:

  • eb-papers defines concepts, frameworks, and meaning
  • eb-metrics implements individual metrics
  • eb-evaluation orchestrates evaluation workflows
  • eb-adapters standardizes model interfaces

This repository focuses on bridging external modeling libraries into a common, evaluation-ready form.


What This Library Provides

  • A common adapter base class defining a unified interface for forecast models
  • Library-specific adapters for popular forecasting and ML frameworks
  • Consistent prediction and evaluation hooks compatible with EB metrics
  • Extensible patterns for adding new model families without changing downstream evaluation logic

Current adapters include support for:

  • CatBoost
  • LightGBM
  • Prophet
  • Statsmodels-based models

Scope

This repository focuses on model adaptation, not model training algorithms or metric definitions.

In scope:

  • Wrapping external model APIs behind a consistent adapter interface
  • Standardizing prediction outputs for evaluation
  • Providing compatibility with EB evaluation pipelines

Out of scope:

  • Metric definitions and loss formulations (see eb-metrics)
  • Evaluation orchestration logic (see eb-evaluation)
  • Model training methodology or hyperparameter optimization
  • Conceptual framework definitions (see eb-papers)

Installation

Install from PyPI:

pip install eb-adapters

For development or local use:

pip install -e .

Package Structure

The repository follows a clean, modern Python package layout:

eb-adapters/
├── src/eb_adapters/
│   ├── base.py            # Abstract adapter base class
│   ├── catboost.py        # CatBoost model adapter
│   ├── lightgbm.py        # LightGBM model adapter
│   ├── prophet.py         # Prophet model adapter
│   └── statsmodels.py     # Statsmodels-based adapters
│
├── tests/
│   └── adapters/          # Unit tests for adapter implementations
│
├── pyproject.toml         # Build and dependency configuration
├── README.md              # Project documentation
└── LICENSE                # BSD-3-Clause license

Relationship to Other EB Repositories

  • eb-papers
    Source of truth for conceptual definitions and evaluation philosophy.

  • eb-metrics
    Provides the metric implementations used during evaluation.

  • eb-evaluation
    Orchestrates evaluation workflows using adapted models.

  • eb-adapters
    Ensures heterogeneous models can be evaluated consistently.

When discrepancies arise, conceptual intent in eb-papers should be treated as authoritative.


Development and Testing

Tests are located under the tests/ directory and mirror adapter coverage.

To run the test suite:

pytest

Status

This package is under active development. Public APIs may evolve prior to the first stable release.

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

eb_adapters-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eb_adapters-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file eb_adapters-0.1.0.tar.gz.

File metadata

  • Download URL: eb_adapters-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for eb_adapters-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d47d1b17513a30d24573f8beb472ec936c9c39675cedad4ee0bb664c3892a1cd
MD5 7a0fbf9346ee57de3e8a6d25e72e3d80
BLAKE2b-256 5303ea311e8115a4b28dd79ed250b573c2c30981048685fe686ddadcfeb51be2

See more details on using hashes here.

File details

Details for the file eb_adapters-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: eb_adapters-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for eb_adapters-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af4d991456bbb50566475040bf6f73a59432f81ecff281da45c846162b388c65
MD5 368acd9a80cdd79580e58d3a15d6cf34
BLAKE2b-256 df2f160f84563379dab4f8d65c4b3e5e64bedb640d70cf5e07473b231feb8fd4

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