kedro-psutil-telemetry
A Kedro hook that continuously samples system resources in a background thread during pipeline execution and dispatches metrics to pluggable sinks (console, MLflow, or your own).
Full documentation at saemeon.github.io/kedro-psutil-telemetry
Installation
pip install kedro-psutil-telemetry
That's it. Kedro auto-discovers the hook via entry points — no settings.py changes needed. Metrics are logged to the console at the default 1-second interval.
With MLflow support:
pip install kedro-psutil-telemetry[mlflow]
Usage
Zero-config (auto-discovery)
Install the package and run your pipeline. Kedro registers the hook automatically with default settings (console logging, 1s interval, all metrics enabled).
Custom configuration
To change the sink, interval, or any metric, register the hook explicitly in settings.py:
from kedro_psutil_telemetry import PipelinePsutilTelemetry, mlflow_sink
HOOKS = (
PipelinePsutilTelemetry(
sink=mlflow_sink, # log to MLflow instead of console
interval=2.0, # sample every 2 seconds
),
)
Manual registration takes precedence — Kedro won't double-register the hook.
Metrics
All metrics are tagged with the currently-running node name and use the configurable prefix (default: "pipeline").
| Metric | Description |
|---|---|
{prefix}.mem.rss_mb |
RSS memory of main process + children (MB) |
{prefix}.mem.swap_mb |
System swap usage (MB) |
{prefix}.cpu.percent |
System-wide CPU utilisation (%) |
{prefix}.io.read_mb |
Disk read since last sample (MB) |
{prefix}.io.write_mb |
Disk write since last sample (MB) |
{prefix}.net.sent_mbs |
Network bytes sent per second (MB/s) |
{prefix}.net.recv_mbs |
Network bytes received per second (MB/s) |
A peak-RSS and peak-CPU summary is logged at the end of every run.
All options
HOOKS = (
PipelinePsutilTelemetry(
sink=mlflow_sink, # or a list of sinks, or your own callable
interval=2.0, # sample every 2 seconds (default: 1.0)
prefix="pipeline", # metric name prefix (default: "pipeline")
include_children=True, # include child processes (default: True)
cpu=False, # disable a metric by passing False
net_sent=False,
disk_read="my.reads", # rename a metric by passing a string
),
)
Custom Sinks
Any callable matching (name: str, value: float, step: int, tags: dict | None) -> None works as a sink:
def my_sink(name, value, step, tags=None):
print(f"{name}={value:.2f} @ step {step} node={tags.get('node')}")
HOOKS = (PipelinePsutilTelemetry(sink=my_sink),)
License
MIT
Metadata
Release files for kedro-psutil-telemetry 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kedro_psutil_telemetry-0.0.2.tar.gz | 213.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kedro_psutil_telemetry-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 221.4 kB
Release files / kedro_psutil_telemetry-0.0.2.tar.gz
| Download URL | kedro_psutil_telemetry-0.0.2.tar.gz |
|---|---|
| Size | 213.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
835ae9e31fbf3007c76ba1a5e98e4b7d9f5deb8e40becc945a882a4e1768449a
|
|
BLAKE2b-256 checksum How to use checksums |
29c064b336b6e6aabc11fad7e3a785494787117b8dfb44a4ccba0b782d42e35b
|
| 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 Mar 20, 2026.
Transparency logRelease files / kedro_psutil_telemetry-0.0.2-py3-none-any.whl
| Download URL | kedro_psutil_telemetry-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd3c7961026f5e96140892edde8c07529a96c103c7851f1d8c98c026a8876763
|
|
BLAKE2b-256 checksum How to use checksums |
9e8bb7145bc6bce78caee0139b019477e82a887d2b7379d38946fb126bd17a2f
|
| 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 Mar 20, 2026.
Transparency log