Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

bionemo-core

Common code that all BioNeMo framework packages depend on. Contains highly reusable, battle-tested abstractions and implementations that are valuable across a wide variety of domains and applications.

Crucially, the bionemo-core Python package (namespace bionemo.core) depends on PyTorch and PyTorch Lightning. Other key BioNeMo component libraries, such as bionemo-llm and bionemo-geometric, obtain their PyTorch dependencies via bionemo-core.

Developer Setup

After following the setup specified in the README, you may install this project's code in your environment via executing:

pip install -e .

To run unit tests with code coverage, execute:

pytest -v --cov=bionemo --cov-report=term .

Package Highlights

In bionemo.core.model.config:

  • ModelOutput: A Model's forward pass may produce a tensor, multiple tensors, or named tensors.
  • LossType: A generic type parameter for a loss function.
  • Model: An interface for any ML model that accepts and produces torch.Tensors.
  • ModelType: A generic type parameter that is constrained to the Model interface.
  • BionemoModelConfig: An abstract class that enables parameterizable model instantiation that is compatible with Megatron.
  • BionemoTrainableModelConfig: An extension that includes the loss function to use with the model during training.

In bionemo.core.utils:

  • the batching_utils module's pad_token_ids, which pads token ids with padding value & returns a mask.
  • the dtype module's get_autocast_dtype, which converts from nemo/nvidia datatypes to their PyTorch equivalents.
  • the random_utils module, which includes functions for managing random seeds and performing sampling.

In the bionemo.data package, there is:

  • multi_epoch_dataset: contains many dataset implements that are useful for mutli-epoch training.
  • resamplers: contains a P-RNG based Dataset implementation.

There's a constant global value, bionemo.core.BIONEMO_CACHE_DIR, which is used as a local on-disk cache for resources.

Metadata

Release files for bionemo-core 2.4.5

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

Source distribution (sdist)

Source distribution for bionemo-core 2.4.5
File Size Uploaded
bionemo_core-2.4.5.tar.gz 31.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bionemo-core 2.4.5
File Interpreter ABI Platform
bionemo_core-2.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 72.4 kB

Release files / bionemo_core-2.4.5.tar.gz

Download URL bionemo_core-2.4.5.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6c0af90ce00d86ae68f9ed8731ebce57c626748997cbde32429cc91a1dd5f428
BLAKE2b-256 checksum
How to use checksums
0aaa242e4d7f076b4c2352f7c133b856c78088dddc20277416edd1912ba74ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Aug 19, 2025.

Transparency log

Release files / bionemo_core-2.4.5-py3-none-any.whl

Download URL bionemo_core-2.4.5-py3-none-any.whl
Size 40.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f7b4a3b55d8b54ee735942dc93971e88ebe890fdf2cb51ee2b788110d971472
BLAKE2b-256 checksum
How to use checksums
0fb9b5607031638508fa95f0e922d8ad3b2f4e94d1bc8469a988c8372be181f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Aug 19, 2025.

Transparency log
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