Skip to main content

PufferLib core functionality with vectorized environments and reinforcement learning

Project description

PufferLib Core

Minimal PufferLib core functionality with vectorized environments.

This package contains only the essential components:

  • spaces: Observation/action space handling
  • emulation: Environment compatibility layer for Gym/Gymnasium/PettingZoo
  • vector: Vectorized environment implementations

For the full PufferLib with training capabilities and environments, see the main pufferlib package.

Installation

Basic Installation (Python-only)

pip install pufferlib-core

Installation with C++/CUDA Extensions

To enable the pufferlib._C extensions (required for advanced features like CUDA advantage computation):

# First install torch
pip install torch

# Then install with extensions
PUFFERLIB_BUILD_EXT=1 pip install pufferlib-core[ext]

Or you can install the dependencies and build in separate steps:

# Install with extra dependencies
pip install pufferlib-core[ext]

# Then rebuild with extensions
PUFFERLIB_BUILD_EXT=1 pip install --upgrade --force-reinstall --no-deps pufferlib-core

Usage

After installation with extensions, you should be able to import the C extensions:

import pufferlib
from pufferlib import _C  # This will only work if extensions were built

Development

To build extensions in development mode:

PUFFERLIB_BUILD_EXT=1 python setup.py build_ext --inplace

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

pufferlib_core-3.0.8.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

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

pufferlib_core-3.0.8-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file pufferlib_core-3.0.8.tar.gz.

File metadata

  • Download URL: pufferlib_core-3.0.8.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for pufferlib_core-3.0.8.tar.gz
Algorithm Hash digest
SHA256 d60690430163cc27daffc982264d109040e17c42d71db531a62c684b4415ddf4
MD5 f53945574a509993abfaa860e8f08cac
BLAKE2b-256 b0f2d9c4137b63e3ff60ec6f05adf4cbce25ea202e45da3711e2f442673a7b95

See more details on using hashes here.

File details

Details for the file pufferlib_core-3.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for pufferlib_core-3.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c419cbff4d9f64059d3f0a3b9ac2416a54c878ec2b31d9a1e9da8122987b72
MD5 b4b72050c214adca399189cc915fb681
BLAKE2b-256 3b9e5bca8d2c2a56f4e1fdaf2dbb389613b17012c5ba846e5d137057880d4de3

See more details on using hashes here.

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