Skip to content

Commit

Permalink
fix assertion on Tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed May 14, 2024
1 parent 7016130 commit ba7e4e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/axolotl/utils/callbacks/perplexity.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def compute(
"""
Compute perplexity in a fixed length sliding window across the sequence.
"""
assert references, "Missing parameter: references"
assert references is not None, "Missing parameter: references"

references_tokenized = self.tokenizer(
references, return_tensors="pt", padding=True, truncation=True
Expand Down

0 comments on commit ba7e4e2

Please sign in to comment.