Spaces:
Paused
Paused
nit
Browse files
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]:
|