Skip to main content

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

For local development, 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.

Metadata

Release files for hybrax 0.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 hybrax 0.1.0
File Size Uploaded Provenance Actions
hybrax-0.1.0.tar.gz 4.7 MB With provenance Details for hybrax-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hybrax 0.1.0
File Interpreter ABI Platform Actions
hybrax-0.1.0-py3-none-any.whl Python 3 none any Details for hybrax-0.1.0-py3-none-any.whl

Total release size: 5.0 MB

Release files / hybrax-0.1.0.tar.gz

Download URL hybrax-0.1.0.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
7657f8b8c29d186ac69885533b65265c65a220fac2ac8c58c512c0484cca1272
BLAKE2b-256 checksum
How to use checksums
60c03f5d8fe7f907115fe8c28075720b63fe0f8c0dfdb06d315715fd4edb7dce
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 Oct 29, 2026.

Transparency log

Release files / hybrax-0.1.0-py3-none-any.whl

Download URL hybrax-0.1.0-py3-none-any.whl
Size 347.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3023ac00ae2cd73a5cb274650fd22fa75d14c709767e276f378ec2375e85128f
BLAKE2b-256 checksum
How to use checksums
8d95f67589f06e8fe349bc23ff98132b3300641b27dcc34b13486d5cf82073d5
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 Oct 29, 2026.

Transparency log

Security for hybrax 0.1.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.

Select from 2 files

Attestation for hybrax-0.1.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 Oct 29, 2026.

Transparency log

A 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.

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