Skip to main content
logo

pangolinn: Unit Testing for Neural Networks

As a Pangolin looks for bugs and catches them, the goal of this library is ot help developers finding bugs in their neural networks and newly-created models.

🖥 Installation

pangolinn is available on PyPi and can be installed by running:

pip install pangolinn

Alternatively, the latest development version can be installed with:

git clone https://github.com/hlt-mt/pangolinn.git
cd pangolinn
pip install -e .

If you want to contribute to the project, you can install the additional development dependencies by using the dev specifier:

pip install -e .[dev]

🔧 Usage

To test your model/module you need to:

  • create a pangolinn wrapper that builds it and determines how to use it;
  • create a test suite that inherits from the pangolinn tester you want to use and set the attribute module_wrapper_class to the name of the wrapper class of your module.

For complete examples, please refer to the UTs in this repository, e.g. Transformer decoder causality test.

🚀 Features

The repository currently contains the following test suites:

  • Encoder padding tester: checks that the presence of padding does not alter the results.
  • Causality tester: checks that a module fulfils the causal property, i.e. it does not look at future elements of the sequence (e.g., as autoregressive decoders have to do).

💡 Contributing and Feature Requests

Our goal is to provide a comprehensive test suit for neural networks, therefore contributions from interested researchers and developers are extremely appreciated.

You can either create a feature request to propose new tests or a pull request to contribute to our repository with your own tests.

📃 Licence

pangolinn is licensed under Apache Version 2.0.

🏅 Citation

If using this repository, please cite:

@inproceedings{papi-et-al-2024-when,
  title={{When Good and Reproducible Results are a Giant with Feet of Clay: The Importance of Software Quality in NLP}},
  author={Papi, Sara and Gaido, Marco and Pilzer, Andrea and Negri, Matteo},
  booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
  address = "Bangkok, Thailand",
  year={2024}
}

Release files for pangolinn 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pangolinn 0.0.1
File Size Uploaded
pangolinn-0.0.1.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pangolinn 0.0.1
File Interpreter ABI Platform
pangolinn-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.7 kB

Release files / pangolinn-0.0.1.tar.gz

Download URL pangolinn-0.0.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8b2fda4695147a52d5c72ae21976c3757737341dedf937617a1c7bbb10b29587
BLAKE2b-256 checksum
How to use checksums
3e649dd91a4de51363b5b5e9e4cd0ee5dc20fe995f5679c8b2ad907830977081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release files / pangolinn-0.0.1-py3-none-any.whl

Download URL pangolinn-0.0.1-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
32b9cff8865d6614ae26b3f45d32c7e3f0bb9f933208f09eab62bfeac2805f24
BLAKE2b-256 checksum
How to use checksums
7748f5f027a6d0ec1358ca657fba990f536493b6d803ba2a85d3e5e34d2e6c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page