Spaces:
Sleeping
Sleeping
File size: 666 Bytes
98c0f96 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from patch_view.constraints import default_thresholds_for_metric, guard_range_for_metric
def test_entropy_defaults_are_smaller_than_perplexity():
entropy_defaults = default_thresholds_for_metric("entropy")
perplexity_defaults = default_thresholds_for_metric("perplexity")
for name in entropy_defaults:
assert entropy_defaults[name] <= perplexity_defaults[name]
def test_guard_slider_ranges_change_with_metric():
entropy_guard = guard_range_for_metric("entropy")
perplexity_guard = guard_range_for_metric("perplexity")
assert entropy_guard.maximum < perplexity_guard.maximum
assert entropy_guard.step < perplexity_guard.step
|