Skip to content

Commit

Permalink
Fix linting complaints.
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephCatrambone committed Oct 31, 2024
1 parent 43a917c commit 05e89b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion validator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(
# There are some spurious loading complaints with TFDistilBert models.
# See https://discuss.huggingface.co/t/message-some-layers-from-the-model-were-not-used/1972/7

def validate(self, value: Any, metadata: Dict = None) -> ValidationResult:
def validate(self, value: Any, metadata: Optional[Dict] = None) -> ValidationResult:
"""Validates that the text is free from biases related to age, gender, sex, ethnicity, religion, etc."""
if isinstance(value, str):
value = [value,] # Ensure we're always passing lists of strings into the classifier.
Expand Down
2 changes: 1 addition & 1 deletion validator/post-install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
print("post-install starting...")
from transformers import pipeline
print("post-install starting...")
_ = pipeline("text-classification", "d4data/bias-detection-model")
print("post-install complete!")

0 comments on commit 05e89b6

Please sign in to comment.