Hybrax
Bioprocess hybrid models and data management in JAX.
Hybrid models, also known as universal differential equations (UDEs) or grey-box models, embed learned components such as neural networks in a mechanistic ODE.
Hybrax combines bioprocess data interchange and hybrid model training in one
package. hybrax.format provides the data model, validation, serialization,
and mechanistic right-hand side. hybrax.train provides preparation,
augmentation, training, prediction, and leave-one-out cross-validation.
Read the documentation for tutorials, gallery examples, and API reference.
Motivation
Bioprocess modeling research lacks standardized data formats, making it
difficult to compare modeling approaches across labs and publications.
hybrax.format provides a common hierarchical data structure with
built-in validation, serialization, and mechanistic modeling support.
Built on JAX and Equinox, it enables automatic differentiation through
ODE integration for gradient-based hybrid model training.
Installation
Install the latest release from PyPI (requires Python 3.12 or newer):
pip install hybrax
For local development, clone the repository and create the uv environment with the development extras:
uv sync --extra dev
Run tests with uv run pytest. Add -n 12 to use 12 pytest-xdist workers.
Quick start
import hybrax.format as bp
# Load a process collection from JSON
collection = bp.serialization.load_process_collection("data.json")
# Explore the collection
bp.print_collection_structure(collection, verbosity=1)
# Access a specific process
process = collection.processes["run_1"]
# Validate data integrity
is_valid, messages = bp.validate_process(process)
# Inspect a single process
bp.print_process_structure(process, verbosity=3)
# Plot
fig = bp.plot_process(process)
Modules
| Module | Description |
|---|---|
hybrax.format.dataclasses |
Hierarchical data structures (BioProcessCollection, BioProcess, etc.) |
hybrax.format.time_series |
Time-series container with optional fitted spline coefficients (JAX pytree) |
hybrax.format.splines |
Pseudobatch transform, segmented spline fitting |
hybrax.format.mechanistic |
ODE right-hand side and control splines (integration lives in hybrax.train) |
hybrax.format.serialization |
JSON save/load for the full data hierarchy |
hybrax.format.validate |
Data integrity checks |
hybrax.format.inspect |
Text printing and matplotlib visualization |
hybrax.format.simulation |
Event bookkeeping for synthetic datasets |
hybrax.train |
Preparation, hybrid model training, prediction, and cross-validation |
See the documentation for the data structure and the training workflow.
License
Hybrax is released under the MIT license; see LICENSE. Some example data comes from third parties and keeps its original license; see THIRD_PARTY.md.
Metadata
Release files for hybrax 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hybrax-0.2.0.tar.gz | 4.7 MB | With provenance | Details for hybrax-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hybrax-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for hybrax-0.2.0-py3-none-any.whl |
Total release size: 5.1 MB
Release files / hybrax-0.2.0.tar.gz
| Download URL | hybrax-0.2.0.tar.gz |
|---|---|
| Size | 4.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43ee599f57e14010ddbe3f8b62f6e0c56b44655e424b7388b53c235f2be19adb
|
|
BLAKE2b-256 checksum How to use checksums |
d89361884832da18669b2776052231b9369d3ea46797ec96c3033c85f0c7d368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 12, 2026.
Transparency logRelease files / hybrax-0.2.0-py3-none-any.whl
| Download URL | hybrax-0.2.0-py3-none-any.whl |
|---|---|
| Size | 354.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
914e1f765edf2d5c608da3b73b690b6d92c6d04da1da01b5127cc803f842a90c
|
|
BLAKE2b-256 checksum How to use checksums |
acc859214d699b05a77e21622f7d05022fde3673a5efd89015bb0e4508163ba4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 12, 2026.
Transparency logSecurity for hybrax 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hybrax-0.2.0.tar.gz
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 Nov 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.