Skip to content

Releases: sensorlab/eCAL

v0.1.0 — Initial release: eCAL on PyPI

Choose a tag to compare

@vh2001 vh2001 released this 17 Jul 10:15
c049a38

Description

First public release of eCAL — an analytical estimator for the energy cost of the full AI model lifecycle (data transmission, preprocessing, training, evaluation, and inference), reported as both a total energy breakdown (Joules) and the eCAL metric (J/bit).

Published alongside our paper in the IEEE Journal on Selected Areas in Communications (JSAC), 2026: The Energy Cost of Artificial Intelligence Lifecycle in Communication Networks.

Install

pip install ecal-energy

Quickstart

import ecal

result = ecal.estimate(
    model_type="MLP",
    model_params={"num_layers": 3, "din": 10, "dout": 2},
    num_samples=1000,
    num_epochs=50,
    hardware="apple_m2",
)

print(f"Total energy: {result['total']:.4f} J")
print(f"eCAL: {result['ecal_j_per_bit']:.2e} J/bit")

Or from the command line:

ecal estimate --model MLP --layers 3 --epochs 50 --hardware apple_m2

What's included

  • ecal.estimate() — single-call API covering the full lifecycle (transmission → preprocessing → training/evaluation → inference)
  • ecal CLI (ecal estimate, ecal profiles, ecal --version)
  • Analytical FLOP calculators for MLP, CNN, KAN, and Transformer architectures
  • Bundled hardware profiles (Apple M2, NVIDIA A100 80GB, NVIDIA H100 SXM, generic CPU/edge) with FLOPS/TDP-based energy conversion
  • Full documentation (installation, quickstart, architecture, CLI reference, configuration) and API reference: https://sensorlab.github.io/eCAL/docs/
  • Example scripts under examples/ showing both the single-call API and a stage-by-stage walkthrough of the pipeline
  • 52 automated tests covering the API, CLI, calculators, and hardware profiles

Citation

If you use eCAL, please cite the paper — see the citation page for full BibTeX entries.