Skip to content

Commit

Permalink
Merge pull request #76 from unitaryai/pin_tf_version
Browse files Browse the repository at this point in the history
Pin transformers version to 4.22.1
  • Loading branch information
laurahanu authored Dec 19, 2022
2 parents 452932a + 8cb72af commit c678a23
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
10 changes: 2 additions & 8 deletions hubconf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
dependencies = ["torch"]
from detoxify import multilingual_toxic_xlm_r, toxic_albert, toxic_bert, unbiased_albert, unbiased_toxic_roberta

from detoxify import ( # noqa: E402
multilingual_toxic_xlm_r,
toxic_albert,
toxic_bert,
unbiased_albert,
unbiased_toxic_roberta,
)
dependencies = ["torch"]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytorch-lightning > 1.5.0
torch >= 1.10.0
transformers != 4.18.0
transformers == 4.22.1
kaggle >= 1.5.8
pandas >= 1.1.2
scikit-learn >= 0.23.2
Expand Down
18 changes: 12 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ verbose = 2
format = pylint
# see: https://www.flake8rules.com/
ignore =
E731 # Do not assign a lambda expression, use a def
W504 # Line break occurred after a binary operator
W503 # Line break occurred after a binary operator
F401 # Module imported but unused
F841 # Local variable name is assigned to but never used
W605 # Invalid escape sequence 'x'
# Do not assign a lambda expression, use a def
E731,
# Line break occurred after a binary operator
W504,
# Line break occurred after a binary operator
W503,
# Module imported but unused
F401,
# Local variable name is assigned to but never used
F841,
# Invalid escape sequence 'x'
W605

# setup.cfg or tox.ini
[check-manifest]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

setup(
name="detoxify",
version="0.5.0",
version="0.5.1",
description="A python library for detecting toxic comments",
long_description=long_description,
long_description_content_type="text/markdown",
author="Unitary",
author_email="[email protected]",
url="https://github.com/unitaryai/detoxify",
install_requires=[
"transformers != 4.18.0", # v4.18.0 fails to properly load the finetuned weights
"transformers == 4.22.1", # pin to this version due to #75
"torch >= 1.7.0",
"sentencepiece >= 0.1.94",
],
Expand Down

0 comments on commit c678a23

Please sign in to comment.