roastcoffea

raw JSON →
0.1.2 verified Sat May 09 auth: no python

A performance monitoring and metrics collection library for Coffea-based High Energy Physics analysis workflows. Current version 0.1.2, actively maintained with monthly releases.

pip install roastcoffea
error ImportError: cannot import name 'MetricsProcessor' from 'roastcoffea.processor'
cause MetricsProcessor was moved from roastcoffea.processor to roastcoffea in version 0.1.0.
fix
Use 'from roastcoffea import MetricsProcessor'.
error AttributeError: 'EventFile' object has no attribute 'file_handle'
cause The attribute was misspelled; correct access is via events.attrs['@events.factory'].
fix
Use events.attrs['@events.factory'] to get the file handle.
error RuntimeError: This environment is not supported (requires Python >=3.12 and <3.14)
cause roastcoffea requires Python 3.12 or 3.13.
fix
Upgrade/downgrade Python to version 3.12 or 3.13 and reinstall.
breaking In version 0.1.0, the import path for MetricsProcessor changed from roastcoffea.processor to roastcoffea, breaking existing code using the old import.
fix Update import to 'from roastcoffea import MetricsProcessor'.
deprecated The attribute 'file_handle' on events is misspelled; use 'events.attrs["@events.factory"]' instead.
fix Access file handle via events.attrs["@events.factory"].
gotcha Requires Python >=3.12 and <3.14; using Python 3.11 or lower will fail to install.
fix Ensure Python version is 3.12 or 3.13.

Basic usage integrating MetricsProcessor into a Coffea Runner.

from coffea.processor import Runner
from roastcoffea import MetricsProcessor

runner = Runner.executor(
    executor='iterative',
    schema='nanomaker',
    savemetrics=True,
    metrics={
        'processor': MetricsProcessor.
    }
)