Metadata-Version: 2.4
Name: pyromancy-ai
Version: 0.0.1
Summary: A Compact Library for Predictive Coding with PyTorch
Project-URL: Source, https://github.com/mdominijanni/pyromancy
Project-URL: Documentation, https://pyromancy.ai
Author-email: Marissa Dominijanni <mdomini@buffalo.edu>
License-Expression: BSD-3-Clause
License-File: LICENSE.txt
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: einops>=0.7
Requires-Dist: torch>=2.7.0
Requires-Dist: torchvision>=0.22.0
Provides-Extra: all
Requires-Dist: coverage[toml]; extra == 'all'
Requires-Dist: docutils>=0.21.2; extra == 'all'
Requires-Dist: esbonio>=0.16.5; extra == 'all'
Requires-Dist: furo>=2024.8.6; extra == 'all'
Requires-Dist: myst-parser>=4.0.1; extra == 'all'
Requires-Dist: mystmd>=1.3.28; extra == 'all'
Requires-Dist: pytest-cov>=6.0.0; extra == 'all'
Requires-Dist: pytest>=8.3.4; extra == 'all'
Requires-Dist: sphinx-design>=0.6.1; extra == 'all'
Requires-Dist: sphinx-remove-toctrees>=1.0.0; extra == 'all'
Requires-Dist: sphinx>=8.2.3; extra == 'all'
Provides-Extra: docs
Requires-Dist: docutils>=0.21.2; extra == 'docs'
Requires-Dist: esbonio>=0.16.5; extra == 'docs'
Requires-Dist: furo>=2024.8.6; extra == 'docs'
Requires-Dist: myst-parser>=4.0.1; extra == 'docs'
Requires-Dist: mystmd>=1.3.28; extra == 'docs'
Requires-Dist: sphinx-design>=0.6.1; extra == 'docs'
Requires-Dist: sphinx-remove-toctrees>=1.0.0; extra == 'docs'
Requires-Dist: sphinx>=8.2.3; extra == 'docs'
Provides-Extra: test
Requires-Dist: coverage[toml]; extra == 'test'
Requires-Dist: pytest-cov>=6.0.0; extra == 'test'
Requires-Dist: pytest>=8.3.4; extra == 'test'
Description-Content-Type: text/markdown

![Pyromancy Header](misc/assets/pyromancy-github-header.png)

[![PyPI - Version](https://img.shields.io/pypi/v/pyromancy-ai.svg)](https://pypi.org/project/pyromancy-ai)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyromancy-ai.svg)](https://pypi.org/project/pyromancy-ai)

-----

## About
Pyromancy is a compact library for [predictive coding](https://arxiv.org/abs/2407.04117), implemented using [PyTorch](https://github.com/pytorch/pytorch). It takes a minimal approach, providing the core components for building and training predictive coding networks.

## Installation
Pyromancy is available as a package on PyPI and can be installed as follows.

```bash
pip install pyromancy-ai
```

By default, this installs the `torch` and `torchvision` packages with *only* CPU support (Linux/Windows) or support for CPU and MPS (macOS). To include support for CUDA or ROCm, a corresponding ``extra-index-url`` must be specified.

```bash
pip install pyromancy-ai --extra-index-url https://download.pytorch.org/whl/cu128
```

Installing with this command includes support for CPU and for CUDA 12.8. The installation options can be found on PyTorch's [getting started](https://pytorch.org/get-started/locally/) page.

## Getting Started
See the example, [Classifying MNIST with a Hierarchical PCN](https://pyromancy.ai/en/latest/tutorials/mnist-classifier-pcn.html), for a complete worked-out example of how to build and train a predictive coding network.

## License
Pyromancy is distributed under the terms of the [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) license.
