unitaryai / detoxify

Trained models & code to predict toxic comments on all 3 Jigsaw Toxic Comment Challenges. Built using ⚡ Pytorch Lightning and 🤗 Transformers. For access to our API, please email us at contact@unitary.ai.
https://www.unitary.ai/
Apache License 2.0
893 stars 115 forks source link

Limit pytorch lightning version to prevent breaking changes #83

Closed dcferreira closed 1 year ago

dcferreira commented 1 year ago

Pytorch lightning 2.0 has breaking changes that affect the training code.

If you setup a new environment with the current requirements, you'll get this error when running pytest:

FAILED tests/test_trainer.py::test_trainer - TypeError: __init__() got an unexpected keyword argument 'gpus'

This PR fixes that by limiting pytorch lightning's version to be below 2.0.