Skip to content

Commit

Permalink
fix pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
bmosaicml committed Apr 11, 2024
1 parent 019c58a commit 779f490
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llmfoundry/eval/datasets/in_context_learning_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ def split_batch(self, batch: Any, microbatch_size: Union[int , float]) -> Sequen
# Don't split kwargs that don't change
# Normally split torch tensors
# List split lists of strings
if isinstance(microbatch_size, float):
raise ValueError('split_batch does not support floating point microbatch_size.')
chunked = {}
for k, v in batch.items():
if k in self.static_keys:
Expand Down Expand Up @@ -922,6 +924,8 @@ def split_batch(self, batch: Any, microbatch_size: Union[int , float]) -> Sequen
Returns:
list: List of chunked batches
"""
if isinstance(microbatch_size, float):
raise ValueError('split_batch does not support floating point microbatch_size.')
chunked = {}
for k, v in batch.items():
if k in self.static_keys:
Expand Down

0 comments on commit 779f490

Please sign in to comment.