Prometheus metrics collectors for Keras
Project description
Gangplank
Export Keras metrics to Prometheus
Prometheus is a monitoring system that pulls metrics from applications and infrastructure. While polling works for applications that are continuously running, scraping metrics does not work well with batch jobs such as machine learning training or evaluation jobs. The Prometheus Pushgateway is middleware that connects batch jobs to Prometheus.
Gangplank is a Keras callback for pushing Keras training and testing metrics to Prometheus via a pushgateway.
What metrics are exported?
During training, the following metrics are exported:
- The number of completed training epochs
- The time spent training
- The number of model weights (both trainable and non-trainable)
- The model's loss
- All metrics configured for the model (e.g. accuracy for a classification model or mean absolute error for a regression model)
- (Optionally) A histogram of the model's trainable weights at the end of the training run
For testing (i.e. evaluation), the following metrics are exported:
- The time spent testing
- The model's loss
- All metrics configured for the model (accuracy, mean absolute error, etc.)
- (Optionally) A histogram of the model's trainable weights
Installing Gangplank
Gangplank can be installed from PyPI
pip install gangplank
The installation will also install Keras. Keras needs a tensor arithmetic backend like TensorFlow, JAX or PyTorch. You can install a backend at the same time as installing Gangplank by running one of the following
pip install gangplank[tensorflow]
pip install gangplank[jax]
pip install gangplank[torch]
Note: Running, e.g., pip install gangplank[jax] will install a CPU-only version of JAX. If you want, say, CUDA support you should install JAX separately
pip install gangplank
pip install jax[cuda12]
Similar comments apply to TensorFlow and PyTorch.
Examples
Examples of using Gangplank can be found here.
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 gangplank-0.2.7.tar.gz.
File metadata
- Download URL: gangplank-0.2.7.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfd836d8a78768a2940438756f159aa0c068684abf238e5639c72eaeabe6d019
|
|
| MD5 |
2c93abcfeede80c8e942577321f27678
|
|
| BLAKE2b-256 |
b952a9c63fd2a8742692507bd04e965ea5ba31281af5fb5dfaec8f7bcaa84e69
|
Provenance
The following attestation bundles were made for gangplank-0.2.7.tar.gz:
Publisher:
publish-to-pypi.yml on hammingweight/gangplank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gangplank-0.2.7.tar.gz -
Subject digest:
bfd836d8a78768a2940438756f159aa0c068684abf238e5639c72eaeabe6d019 - Sigstore transparency entry: 230524046
- Sigstore integration time:
-
Permalink:
hammingweight/gangplank@65f5fa941ba078f24abd6a8825482c481e5937bc -
Branch / Tag:
refs/tags/0.2.7 - Owner: https://github.com/hammingweight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@65f5fa941ba078f24abd6a8825482c481e5937bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file gangplank-0.2.7-py3-none-any.whl.
File metadata
- Download URL: gangplank-0.2.7-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38f722f7bf797b76a820e9bdac4956059f7258ce26b6713a11f2ff92064aa96c
|
|
| MD5 |
512a15ab6c13c12e3c673afb72d4da9b
|
|
| BLAKE2b-256 |
bee8e2ee9fef7037145193f998e939c1d94a15d601465fbf13ff175e5727e056
|
Provenance
The following attestation bundles were made for gangplank-0.2.7-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on hammingweight/gangplank
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gangplank-0.2.7-py3-none-any.whl -
Subject digest:
38f722f7bf797b76a820e9bdac4956059f7258ce26b6713a11f2ff92064aa96c - Sigstore transparency entry: 230524047
- Sigstore integration time:
-
Permalink:
hammingweight/gangplank@65f5fa941ba078f24abd6a8825482c481e5937bc -
Branch / Tag:
refs/tags/0.2.7 - Owner: https://github.com/hammingweight
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@65f5fa941ba078f24abd6a8825482c481e5937bc -
Trigger Event:
push
-
Statement type: