Skip to content

Commit

Permalink
fixed adding cache argument to certain algorithms (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrest authored Jul 20, 2023
1 parent 740122c commit a7b4ce8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/autolabel/few_shot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def initialize_selector(

example_cls = ALGORITHM_TO_IMPLEMENTATION[algorithm]

params["cache"] = cache
if algorithm not in [
FewShotAlgorithm.FIXED,
FewShotAlgorithm.LABEL_DIVERSITY_RANDOM,
]:
params["cache"] = cache

return example_cls.from_examples(**params)

0 comments on commit a7b4ce8

Please sign in to comment.