Spaces:
Paused
Paused
Ahmet Kaan Sever
commited on
Commit
·
04b81d8
1
Parent(s):
8a3d32e
Getting 50 from each dataset
Browse files
src/deepeval/base_task.py
CHANGED
@@ -194,10 +194,9 @@ class BaseTask(ABC):
|
|
194 |
dataset= load_dataset(self.dataset_repo, token=HF_TOKEN, split="train")
|
195 |
print("Dataset loaded.")
|
196 |
|
197 |
-
# Load
|
198 |
-
|
199 |
-
|
200 |
-
print("Reduced dataset size: ", len(dataset))
|
201 |
end_time = datetime.now()
|
202 |
print(f"Dataset loaded in {(end_time - start_time).seconds} seconds.")
|
203 |
return dataset
|
|
|
194 |
dataset= load_dataset(self.dataset_repo, token=HF_TOKEN, split="train")
|
195 |
print("Dataset loaded.")
|
196 |
|
197 |
+
# Load 50 from each dataset
|
198 |
+
if len(dataset) > 50:
|
199 |
+
dataset = dataset.shuffle(seed=42).select(range(50))
|
|
|
200 |
end_time = datetime.now()
|
201 |
print(f"Dataset loaded in {(end_time - start_time).seconds} seconds.")
|
202 |
return dataset
|