Skip to main content

Minimal PufferLib core functionality with vectorized environments

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pufferlib_core-3.0.7.tar.gz
Algorithm Hash digest
SHA256 1ce1e3084ba114ceb2462c86d97b07fad308d8044a455c9b97669654f0811682
MD5 dca982c28404637b6f2a6fa056c024b5
BLAKE2b-256 b7fcd004d7fd638baa83ca9e3ec53ad993defb6eec655cc287240937341d6faf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pufferlib_core-3.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c1a8b7d0a5bb9b964e30ef2ea0ba058edc719970b4b67118bd0c64d13984eb1e
MD5 67127bea31a3026a9c168bb7859db7e9
BLAKE2b-256 dba665c64d77ef49776d7745db23fdb065112cf6f65d0c0026e9151448fb47d3

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