Skip to content

Commit

Permalink
Add custom artifact path to CoherenceScorer download
Browse files Browse the repository at this point in the history
  • Loading branch information
morganmcg1 committed Feb 5, 2025
1 parent c97963d commit a2a8cf4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions weave/scorers/coherence_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def _load_pipeline(self) -> None:
from transformers import pipeline
if os.path.isdir(self.model_name_or_path):
self._local_model_path = self.model_name_or_path
elif self.model_name_or_path != "":
self._local_model_path = download_model(self.model_name_or_path)
else:
self._local_model_path = download_model(MODEL_PATHS["coherence_scorer"])

Expand Down

0 comments on commit a2a8cf4

Please sign in to comment.