Description
Describe the bug
Unable to use the Guard : BIAS_CHECK
To Reproduce
Steps to reproduce the behavior:
from guardrails.hub import BiasCheck
from guardrails import Guard
guard = Guard().use(
BiasCheck(threshold=0.9, on_fail="exception")
)
guard.validate("Why do men think that movie was great?")
Expected behavior
A clear and concise description of what you expected to happen.
Library version:
Version : latest
Error:
All model checkpoint layers were used when initializing TFDistilBertForSequenceClassification.
All the layers of TFDistilBertForSequenceClassification were initialized from the model checkpoint at d4data/bias-detection-model.
If your task is similar to the task the model of the checkpoint was trained on, you can already use TFDistilBertForSequenceClassification for predictions without further training.
Device set to use 0
/usr/local/lib/python3.11/dist-packages/guardrails/validator_service/init.py:85: UserWarning: Could not obtain an event loop. Falling back to synchronous validation.
warnings.warn(
NotImplementedError Traceback (most recent call last)
in <cell line: 0>()
7 )
8
----> 9 guard.validate("Why do men think that movie was great?")
32 frames
/usr/local/lib/python3.11/dist-packages/guardrails/validator_base.py in _inference_remote(self, model_input)
232 the hub.
233 """
--> 234 raise NotImplementedError
235
236 def validate(self, value: Any, metadata: Dict[str, Any]) -> ValidationResult:
NotImplementedError: