diff --git a/hubconf.py b/hubconf.py index b618a70..921d372 100644 --- a/hubconf.py +++ b/hubconf.py @@ -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"] diff --git a/requirements.txt b/requirements.txt index e67590c..bec7214 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.cfg b/setup.cfg index 082a767..c4ab78a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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] diff --git a/setup.py b/setup.py index b30fbd0..81d3eed 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ 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", @@ -15,7 +15,7 @@ author_email="laura@unitary.ai", 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", ],