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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pufferlib_core-3.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 ed4acf6d3703ca4b6cdd61f4c7f6c2b744bda83819e885c6816ab90532e5661c
MD5 494fccbaa956e672aba9483082b35725
BLAKE2b-256 2cc9fa1ec26feb561ba36752bbddbef5e0c14b78158f5189f96968f7e7e2a654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pufferlib_core-3.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 73d490480ae9cc4550ed30c3d0eb4e0c6e70675ebaf23aeccb3ac49b81493e00
MD5 e835260bcb5c240f8461c7f91bb01cab
BLAKE2b-256 22adfb5af1b961c9d1bf64078d854d03797b207b4c6b52adcb6c207495dc36ba

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