Skip to main content

Shrink Calibration Plugin for Pioreactor

This plugin provides functionality to shrink multiple calibrations across workers in a Pioreactor cluster. It uses a regularized optimization process to fit a unified polynomial model while adjusting for worker-specific variations.

Features

  • Collects calibration data from multiple workers in a Pioreactor cluster.
  • Fits a regularized polynomial model.
  • Allows user interaction to select calibrations and customize parameters.
  • Automatically distributes the resulting calibration back to the workers.

Prerequisites

Before using this plugin, ensure you have:

  • A Pioreactor cluster with workers set up and active.
  • Calibrations already recorded on each worker for the specified device.
  • The Pioreactor software stack installed on your system.

Installation

There are three options:

  1. Install this plugin on your leader via the UI's Plugin page (requires internet access)
  2. Install this plugin on your leader via pio plugins install pioreactor-calibration-shrinkage (requires internet access)
  3. Or copy the __init__.py file's contents into a new .py file in the ~/.pioreactor/plugins directory on your leader.

Usage

Running the Plugin

Use the following command to start the shrink calibration process:

pio calibrations shrinkage --device <DEVICE>

Replace <DEVICE> with the device you want to shrink calibrations for (e.g., pump, sensor).

Workflow

  1. Calibration Selection: The plugin will list available calibrations on each worker. Select the calibrations you wish to include in the shrinkage process.
  2. Parameter Configuration:
    • Polynomial Degree: Specify the degree of the polynomial for the unified model.
    • Closeness Parameter: Adjust the regularization parameter (lambda_a) to control how closely individual calibrations align with the average.
  3. Model Fitting: The plugin fits the model and displays the results. If you're not satisfied, you can adjust parameters and refit.
  4. Calibration Distribution: Once satisfied, the plugin distributes the new calibration data back to the workers.

Example

pioreactor calibrations shrinkage --device media_pump
  • Follow the prompts to select calibrations and configure the fitting parameters.
  • The plugin will output logs detailing the progress and results.

How It Works

  1. Data Collection: The plugin retrieves calibration data from each worker using the Pioreactor API.
  2. Model Fitting: It fits a polynomial model using regularized optimization, adjusting worker-specific scalars (A) and the polynomial coefficients (w).
  3. Calibration Creation: A new calibration is created for each worker, incorporating the unified model and worker-specific adjustments.
  4. Calibration Distribution: The new calibration is posted back to each worker for use.

Support

If you encounter any issues or have questions, please visit the Pioreactor community forums or contact support.


Happy calibrating! 🎉

Metadata

Release files for pioreactor-calibration-shrinkage 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pioreactor-calibration-shrinkage 1.1.0
File Size Uploaded
pioreactor_calibration_shrinkage-1.1.0.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pioreactor-calibration-shrinkage 1.1.0
File Interpreter ABI Platform
pioreactor_calibration_shrinkage-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / pioreactor_calibration_shrinkage-1.1.0.tar.gz

Download URL pioreactor_calibration_shrinkage-1.1.0.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b86e49e1e887a15069809fdf1d64e1e22336462b6077261f516c47e69481a8
BLAKE2b-256 checksum
How to use checksums
b8d778d6e4a5fcc52c1ebd45a2f8ebedfc445eeedce982d29fe82c1ca9db8610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / pioreactor_calibration_shrinkage-1.1.0-py3-none-any.whl

Download URL pioreactor_calibration_shrinkage-1.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
87c00f27fac5f99313f45f430a1ab060805f911ac7e3705bbc44ade9f9ef2b77
BLAKE2b-256 checksum
How to use checksums
d7c4945d65e37e2862150def82eeb6f38418af0d0735ebf8f6dba5d19a992ecd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page