Metadata-Version: 2.4
Name: tensor-regression
Version: 0.1.3
Summary: A small wrapper around pytest_regressions for Tensors
Author-email: Fabrice Normandin <fabrice.normandin@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: numpy>=1.26.4
Requires-Dist: optree>=0.15.0
Requires-Dist: pytest-regressions>=2.5.0
Description-Content-Type: text/markdown

# tensor_regression
A small wrapper to simplify using [pytest_regressions](https://github.com/ESSS/pytest-regressions) with Tensors.

This adds the following to [pytest_regressions](https://github.com/ESSS/pytest-regressions):
- Simple Tensor statistics (min, max, mean, std, shape, dtype, device, hash, etc.) are generated and saved in a .yaml file.
  - The simple statistics are used as a pre-check before comparing the full tensors.
  - These yaml files can be saved with git without having to worry about accidentally saving huge files.
- Full tensors are moved to CPU and saved in a `.npy` file (same as ndarrays_regression), and these .npy files are gitignored.
- Adds a `--gen-missing` argument (default True) which will generate any missing regression files without raising error, as opposed to pytest-regression's `--regen-all` which regenerates all regression files.
