reorder options so debug can happen in the same prepare step
Browse files- scripts/finetune.py +4 -4
scripts/finetune.py
CHANGED
@@ -182,10 +182,6 @@ def train(
|
|
182 |
tokenizer, cfg, DEFAULT_DATASET_PREPARED_PATH
|
183 |
)
|
184 |
|
185 |
-
if prepare_ds_only:
|
186 |
-
logging.info("Finished preparing dataset. Exiting...")
|
187 |
-
return
|
188 |
-
|
189 |
if cfg.debug:
|
190 |
logging.info("check_dataset_labels...")
|
191 |
check_dataset_labels(
|
@@ -195,6 +191,10 @@ def train(
|
|
195 |
tokenizer,
|
196 |
)
|
197 |
|
|
|
|
|
|
|
|
|
198 |
trainer = setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer)
|
199 |
|
200 |
model.config.use_cache = False
|
|
|
182 |
tokenizer, cfg, DEFAULT_DATASET_PREPARED_PATH
|
183 |
)
|
184 |
|
|
|
|
|
|
|
|
|
185 |
if cfg.debug:
|
186 |
logging.info("check_dataset_labels...")
|
187 |
check_dataset_labels(
|
|
|
191 |
tokenizer,
|
192 |
)
|
193 |
|
194 |
+
if prepare_ds_only:
|
195 |
+
logging.info("Finished preparing dataset. Exiting...")
|
196 |
+
return
|
197 |
+
|
198 |
trainer = setup_trainer(cfg, train_dataset, eval_dataset, model, tokenizer)
|
199 |
|
200 |
model.config.use_cache = False
|