Skip to main content

sepsisim

Gymnasium environments for reinforcement learning in sepsis management

Python 3.10+ License: MIT Tests PyPI version


SepsiSim provides three Gymnasium-compatible reinforcement learning environments for sepsis management in the intensive care unit. Built on established physiological models (Reynolds et al. 2006 inflammation dynamics, cardiovascular fluid response, lactate kinetics), these environments enable researchers to develop and benchmark RL algorithms for critical care decision-making without risking patient safety.

Installation

pip install sepsisim              # Core (numpy, scipy, gymnasium)
pip install sepsisim[train]       # + SB3, PyTorch for RL training
pip install sepsisim[all]         # Everything

Development install:

git clone https://github.com/HassDhia/sepsisim.git
cd sepsisim
pip install -e ".[all]"

Quick Start

import gymnasium as gym
import sepsisim

env = gym.make("sepsisim/FluidResuscitation-v0")
obs, info = env.reset(seed=42)
for _ in range(100):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()
env.close()

Environments

Environment Paradigm Observation Action Key Challenge
FluidResuscitation-v0 Continuous 7D (MAP, lactate, UO, damage, volume, bacteria, SOFA) 1D (fluid mL) Restore MAP while avoiding fluid overload
VasopressorTitration-v0 Continuous 8D (+ vaso dose, hours on vaso) 1D (dose change) Maintain MAP without excessive vasoconstriction
SepsisManagement-v0 Multi-action 10D (+ abx status, time) 3D (fluid, vaso, abx) Balance fluids, vasopressors, and antibiotic timing

Architecture

SepsiSim combines four physiological models into configurable Gymnasium environments:

  • Inflammation Model (Reynolds et al. 2006): 4-ODE system tracking bacteria, pro-/anti-inflammatory response, and tissue damage
  • Cardiovascular Model: Lumped-parameter hemodynamic response to fluids and vasopressors with Frank-Starling saturation
  • Lactate Kinetics: Single-compartment model linking tissue hypoperfusion to lactate production and clearance
  • SOFA Scoring: Simplified 3-component organ failure assessment (cardiovascular, renal, metabolic)

Each environment supports three difficulty tiers (easy/medium/hard) via initial bacterial load, enabling curriculum learning and systematic benchmarking.

Paper

The accompanying paper is available at:

Citation

If you use sepsisim in your research, please cite:

@software{dhia2026sepsisim,
  author = {Dhia, Hass},
  title = {SepsiSim: Gymnasium Environments for Reinforcement Learning in Sepsis Management},
  year = {2026},
  publisher = {Smart Technology Investments Research Institute},
  url = {https://github.com/HassDhia/sepsisim}
}

License

MIT License. See LICENSE for details.

Contact

Hass Dhia -- Smart Technology Investments Research Institute

Metadata

Release files for sepsisim 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 sepsisim 0.1.0
File Size Uploaded Provenance
sepsisim-0.1.0.tar.gz 25.0 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 53.6 kB

Release files / sepsisim-0.1.0.tar.gz

Download URL sepsisim-0.1.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
18a3f18bed3b964f93df7c79749f126a395d11ca7bd5cefa03659108ac16fc63
BLAKE2b-256 checksum
How to use checksums
092f5767a255a2a20160c91ce829dcbdbc0c1446df51acd5bc4bd15acb067278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

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

Download URL sepsisim-0.1.0-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1849e73e2f60483abd1741c5309c42b3a2ba0d99ed28ba1ff74384be68dfc454
BLAKE2b-256 checksum
How to use checksums
f2320cdd804a074277466d764bb2d9592f3e44bb234755353943e8d5f6779aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Security for sepsisim 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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