Skip to content

Commit 3de4fb6

Browse files
committed
using default_output_to_bool for lora override test
1 parent f754f6e commit 3de4fb6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/backends/test_huggingface.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
LLMaJRequirement,
1515
Requirement,
1616
ValidationResult,
17+
default_output_to_bool,
1718
)
1819

1920

@@ -90,9 +91,7 @@ def test_constraint_lora_override(session, backend):
9091
assert len(validation_outputs) == 1
9192
val_result = validation_outputs[0]
9293
assert isinstance(val_result, ValidationResult)
93-
assert (
94-
str(val_result.reason) in ["Y", "N", "Yes.", "No."]
95-
) # Checking for any type of result that LLM may output. But might need to be more robust.
94+
assert isinstance(default_output_to_bool(str(val_result.reason)), bool)
9695
backend.default_to_constraint_checking_alora = True
9796

9897

0 commit comments

Comments
 (0)