Skip to content

Commit

Permalink
fix: ZeroDivisionError
Browse files Browse the repository at this point in the history
  • Loading branch information
Hk669 committed Jun 6, 2024
1 parent f8606f2 commit 1a8c210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bpetokenizer/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def train(self, texts, vocab_size, verbose=False, min_frequency=1) -> None:

# Calculate throughput
total_chunks = len(text_chunks)
throughput_chunks = total_chunks / total_time
throughput_chunks = (total_chunks / total_time) if total_time != 0 else 0

if verbose:
print(f"Total time taken: {total_time:.2f} seconds")
Expand Down

0 comments on commit 1a8c210

Please sign in to comment.