Skip to main content

A helper package to conduct multiverse analyses in Python

Project description

multiversum

PyPI Tests Changelog License

multiversum logo

multiversum is a package designed to make it easy to conduct multiverse analyses in Python. The package is intended to seemlessly integrate into a normal analysis or ML workflow and can also be added to an existing pipeline.

Features

  • Simple 🧩: Built with the goal of being as simple as possible to integrate into existing workflows.
  • Parallel 👯: Different universes are automatically evaluated in parallel.
  • Notebooks 📓: Analyses can be written as Jupyter notebooks or Python scripts.
  • Play/Pause ⏯️: Interrupt and then continue a multiverse analysis where you left it.

Installation

Install this library using pip:

pip install multiversum

Usage

Illustration of how to conduct a multiverse analysis using multiversum.

The package always works with two different files: The multiverse.toml (or json / py) ✨️, specifying the different dimensions (and their options) and the universe.ipynb (or py) ⭐️ containing the actual analysis code. The universe file is then evaluated (in parallel) using different dimension-combinations, by running python -m multiversum.

An example using a machine learning workflow in scikit-learn can be found here.

Getting Started

To quickly get started with running your own multiverse analysis, you can use the multiversum starter template.

Examples

This section contains real-world examples of multiverse analyses conducted using this library.

  • Preventing Harmful Data Practices by using Participatory Input to Navigate the Machine Learning Multiverse [Code] [Paper]
  • Bias Begins with Data: The FairGround Corpus for Robust and Reproducible Research on Algorithmic Fairness [Code] [Paper]

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd multiversum
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

Formatting

Ruff is used for formatting and linting. Formatting can be automatically checked / applied wherever possible via ruff check . --fix && ruff format.

Docs

The documentation is generated using mkdocs and can be locally run using mkdocs serve after installing its dependencies using python -m pip install -e '.[docs]'.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multiversum-0.7.2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multiversum-0.7.2-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file multiversum-0.7.2.tar.gz.

File metadata

  • Download URL: multiversum-0.7.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for multiversum-0.7.2.tar.gz
Algorithm Hash digest
SHA256 f4f2de45a490d626648a7164508a17463141ce86ae30a251a0b96aaffed300e5
MD5 4fe354413bf7103d2119031b39437b0f
BLAKE2b-256 3fac38ead29191332cfe56e2e372a025c474b06a28d7aaf36b1007e828153c22

See more details on using hashes here.

Provenance

The following attestation bundles were made for multiversum-0.7.2.tar.gz:

Publisher: publish.yml on jansim/multiversum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file multiversum-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: multiversum-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for multiversum-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 33a31e908e29f73e1ab7a2cf9b25f4e68fb5649a9763644c8871c407e374b91e
MD5 c4cfca06a57574b27709361574b07ae6
BLAKE2b-256 8e29a044f55dd0aa9054824465955f0f5a323a3a999c717c0e6e12a549383a60

See more details on using hashes here.

Provenance

The following attestation bundles were made for multiversum-0.7.2-py3-none-any.whl:

Publisher: publish.yml on jansim/multiversum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page