Update my_model/fine_tuner/fine_tuning_data_handler.py
Browse files
my_model/fine_tuner/fine_tuning_data_handler.py
CHANGED
@@ -127,8 +127,8 @@ class FinetuningDataHandler:
|
|
127 |
if 'train' in dataset:
|
128 |
return [len(self.tokenizer.tokenize(s)) for s in dataset["train"]["text"]]
|
129 |
else:
|
130 |
-
# After filtering the samples with unacceptable token count, the dataset is
|
131 |
-
# dataset = dataset['train']
|
132 |
return [len(self.tokenizer.tokenize(s)) for s in dataset["text"]]
|
133 |
|
134 |
def prepare_dataset(self) -> Tuple[Dataset, Dataset]:
|
|
|
127 |
if 'train' in dataset:
|
128 |
return [len(self.tokenizer.tokenize(s)) for s in dataset["train"]["text"]]
|
129 |
else:
|
130 |
+
# After filtering the samples with unacceptable token count, the dataset is
|
131 |
+
# already `dataset = dataset['train']`.
|
132 |
return [len(self.tokenizer.tokenize(s)) for s in dataset["text"]]
|
133 |
|
134 |
def prepare_dataset(self) -> Tuple[Dataset, Dataset]:
|