Metadata-Version: 2.1
Name: pyfit
Version: 1.0.2
Summary: A minimalist neural networks library built on a tiny autograd engine
Home-page: https://github.com/bpesquet/pyfit
License: MIT
Author: Baptiste Pesquet
Author-email: bpesquet@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Project-URL: Repository, https://github.com/bpesquet/pyfit
Description-Content-Type: text/markdown

# pyfit

A minimalist neural networks library built on a tiny autograd engine. Very much inspired by the [micrograd](https://github.com/karpathy/micrograd) library created by Andrej Karpathy.

## Overview

This project aims to:

- demonstrate [automatic differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation), a core concept of modern Deep Learning frameworks like [PyTorch](https://pytorch.org) and [TensorFlow](https://www.tensorflow.org/);
- define a simple API for training neural nets, somehow mimicking [Keras](https://keras.io/) and [PyTorch Ignite](https://pytorch.org/ignite/);
- follow good coding practices, including [type annotations](https://www.python.org/dev/peps/pep-0484/) and unit tests.

## Demonstration

The [demo notebook](demo.ipynb) showcases what **pyfit** is all about.

## Features

- Autograd engine [ [source](pyfit/engine.py) | [tests](tests/test_engine.py) ]
- Neural networks API [ [source](pyfit/nn.py) | [tests](tests/test_nn.py) ]
- Metrics [ [source](pyfit/metrics.py) | [tests](tests/test_metrics.py) ]
- Optimizers [ [source](pyfit/optim.py) | [tests](tests/test_optim.py) ]
- Data utilities [ [source](pyfit/data.py) | [tests](tests/test_data.py) ]
- Training API [ [source](pyfit/train.py) | [tests](tests/test_train.py) ]

## Development Notes

**pyfit** uses the following tools:

- [black](https://github.com/psf/black) for code formatting.
- [pylint](https://www.pylint.org/) and [mypy](http://mypy-lang.org/) for linting.
- [pytest](https://pytest.org) for testing.

Run the following commands in project root folder to check the codebase.

```bash
> pylint pyfit/* tests/*  # linting (including type checks)
> mypy .  # type checks only
> pytest  # test suite
```

