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.9.tar.gz (60.7 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.9-py3-none-any.whl (61.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pufferlib_core-3.0.9.tar.gz
Algorithm Hash digest
SHA256 2860cea4646fa97826aee398bf4f1efba1a98504776200ec8ee608346a272ddb
MD5 df32e2e27fe1bab57e417bbc5029dab0
BLAKE2b-256 1cb64a30665889238c4a2952f306ec1385a154b62f463ee04e7c5a16975c2930

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pufferlib_core-3.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 53604956e51611c56f431278c824e9fa7f932c3cde2baef4551903d775245812
MD5 69b7153a9bbb4632acb0b9f090880189
BLAKE2b-256 3c242acb83711c3f8694296736c2fcc5fa73142d17a37d1080a7549cfbcc52e0

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