Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Maik Jablonka committed Sep 26, 2023
1 parent 03009ff commit ba6105a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/icl/test_fewshotpredictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_fewshotpredictor(get_llm):

predictor = FewShotPredictor(
llm,
property_name="E isomer pi-pi* wavelength in nm",
property_name="class of the transition wavelength",
n_support=5,
strategy=Strategy.RANDOM,
seed=42,
Expand All @@ -40,3 +40,17 @@ def test_fewshotpredictor(get_llm):
for part in parts:
assert "-" in part
assert ":" in part

queries = predictor._format_queries(["CC", "CCC"])
assert isinstance(queries, str)

prompt = predictor.template.format(
property_name=predictor._property_name,
queries=queries,
examples=formatted,
number=predictor._n_support,
materialclass=predictor._materialclass,
prefix=predictor._prefix,
)

assert isinstance(prompt, str)

0 comments on commit ba6105a

Please sign in to comment.