17 lines
436 B
Python
17 lines
436 B
Python
from pathlib import Path
|
|
|
|
from composer_ans.salieri import SalieriCritic
|
|
|
|
|
|
THES = Path(__file__).resolve().parents[1] / "THES"
|
|
|
|
|
|
def test_salieri_uses_classical_instructor_when_target_omitted() -> None:
|
|
critic = SalieriCritic.from_legacy_paths(THES)
|
|
|
|
positive = critic.evaluate_and_train((0, 0, 1, 5, 4))
|
|
negative = critic.evaluate_and_train((1, 2, 3, 4, 5))
|
|
|
|
assert positive.target == 1
|
|
assert negative.target == 0
|