Commit 6508efaa authored by Baber's avatar Baber
Browse files

nit

parent 8335e43a
...@@ -4,8 +4,6 @@ import pathlib ...@@ -4,8 +4,6 @@ import pathlib
import sys import sys
from typing import List, Optional, Tuple, Union from typing import List, Optional, Tuple, Union
from pandas.core.dtypes.inference import is_float
from lm_eval.api.group import ConfigurableGroup from lm_eval.api.group import ConfigurableGroup
from lm_eval.api.metrics import ( from lm_eval.api.metrics import (
aggregate_subtask_metrics, aggregate_subtask_metrics,
...@@ -206,7 +204,7 @@ def get_sample_size( ...@@ -206,7 +204,7 @@ def get_sample_size(
task, limit: Optional[int], batch_size: Optional[int] task, limit: Optional[int], batch_size: Optional[int]
) -> Union[int, None]: ) -> Union[int, None]:
if limit is not None: if limit is not None:
if batch_size is not None and is_float(limit) and limit == 1.0: if batch_size is not None and isinstance(limit, float) and limit == 1.0:
eval_logger.warning( eval_logger.warning(
"Limit is 1.0, adjusting the sample size to be a multiple of the batch size" "Limit is 1.0, adjusting the sample size to be a multiple of the batch size"
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment