Skip to content

Commit

Permalink
when cache is none logprobs need to be populated
Browse files Browse the repository at this point in the history
  • Loading branch information
rajasbansal committed Nov 7, 2023
1 parent 3e23275 commit 8821330
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/autolabel/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ def calculate(self, model_generation: LLMAnnotation, **kwargs) -> float:
ttl_ms=self.TTL_MS,
)
self.cache.update(cache_entry)
else:
logprobs = self.compute_confidence(
model_generation.prompt, model_generation.raw_response
)
else:
if model_generation.generation_info is None:
logger.debug("No generation info found")
Expand Down

0 comments on commit 8821330

Please sign in to comment.