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.10.tar.gz (48.2 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.10-cp311-cp311-macosx_11_0_arm64.whl (61.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pufferlib_core-3.0.10.tar.gz
Algorithm Hash digest
SHA256 70439d08c196da6394a7b58c34d9b3bfe22a2616df21cd262b1d766185e4838b
MD5 68d332f7d0e6a1819db32f31345e6c5c
BLAKE2b-256 4bc091f5d1d119e371719cc756cfc11ba7c2029f76237cdc8dddc6cb09898182

See more details on using hashes here.

File details

Details for the file pufferlib_core-3.0.10-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pufferlib_core-3.0.10-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 324d9ba67c41d555c36b1fba7b0483ce30abc3289520b8c706cf1b62f8c71c28
MD5 8ae443b2c09e219a0da3309fa66d4439
BLAKE2b-256 f9e1faa170f62270c9748bf74c83b1481f645eb24e816d4c2b070286cba7ec68

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