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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pufferlib_core-3.0.5.tar.gz
Algorithm Hash digest
SHA256 5c69337342cc0d66e9e82e68b861b55b6a436a4a68560da34a6b1779e6abb1b8
MD5 0491e374daa60e2e3e0317bd213be81e
BLAKE2b-256 d549b90a36b078ca42e7e895d04e0454560fd9543421d8bde9c69c3ae201cb86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pufferlib_core-3.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 47a3e53a49869ba8c1e8b5f85cb3097e6acfced66b4851b303837a0975a16d99
MD5 ed4b15234dad2bdab273ab09cd1dabc3
BLAKE2b-256 747fd625d0f772e5199ee4eedec2e1f354bbeb3dce0f6e2ea6940756cad5ab68

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