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.

Download files

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

Source Distribution

bionemo_core-2.4.5.tar.gz (31.5 kB view details)

Uploaded Source

Built Distribution

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

bionemo_core-2.4.5-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file bionemo_core-2.4.5.tar.gz.

File metadata

  • Download URL: bionemo_core-2.4.5.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bionemo_core-2.4.5.tar.gz
Algorithm Hash digest
SHA256 6c0af90ce00d86ae68f9ed8731ebce57c626748997cbde32429cc91a1dd5f428
MD5 44f3264eb1e5e15dd09ee52a5d765777
BLAKE2b-256 0aaa242e4d7f076b4c2352f7c133b856c78088dddc20277416edd1912ba74ac2

See more details on using hashes here.

Provenance

The following attestation bundles were made for bionemo_core-2.4.5.tar.gz:

Publisher: bionemo-subpackage-ci.yml on NVIDIA/bionemo-framework

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

File details

Details for the file bionemo_core-2.4.5-py3-none-any.whl.

File metadata

  • Download URL: bionemo_core-2.4.5-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bionemo_core-2.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6f7b4a3b55d8b54ee735942dc93971e88ebe890fdf2cb51ee2b788110d971472
MD5 eda09826d2fdbf7ea835d6f0c1659fd0
BLAKE2b-256 0fb9b5607031638508fa95f0e922d8ad3b2f4e94d1bc8469a988c8372be181f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for bionemo_core-2.4.5-py3-none-any.whl:

Publisher: bionemo-subpackage-ci.yml on NVIDIA/bionemo-framework

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

Release history Release notifications | RSS feed

This release

2.4.5 This release

2 files

2.4.0

2 files

Supported by

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