joaogante HF staff commited on
Commit
401738d
·
1 Parent(s): 0368e4a
Files changed (1) hide show
  1. src/calibration_datasets.py +1 -3
src/calibration_datasets.py CHANGED
@@ -125,9 +125,7 @@ class CalibrationDataset(ABC):
125
 
126
  print(f"Loading HF dataset {path} with params: {kwargs}")
127
  data: Dataset = load_dataset(path=path, streaming=True, **kwargs)
128
-
129
- limit = limit and min(limit, len(data)) or len(data)
130
- return data.shuffle(seed=42).take(range(limit))
131
 
132
  @staticmethod
133
  def list_with_nls(samples: List[str]) -> List[str]:
 
125
 
126
  print(f"Loading HF dataset {path} with params: {kwargs}")
127
  data: Dataset = load_dataset(path=path, streaming=True, **kwargs)
128
+ return data.shuffle().take(limit)
 
 
129
 
130
  @staticmethod
131
  def list_with_nls(samples: List[str]) -> List[str]: