Kevin Fink
commited on
Commit
·
dc0b7f0
1
Parent(s):
d43fb9e
deve
Browse files
app.py
CHANGED
@@ -220,7 +220,6 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
|
|
220 |
|
221 |
|
222 |
#print(train_set.keys())
|
223 |
-
print('DONE')
|
224 |
|
225 |
|
226 |
#data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)
|
@@ -238,7 +237,7 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
|
|
238 |
#if os.path.exists(training_args.output_dir) and os.listdir(training_args.output_dir):
|
239 |
#train_result = trainer.train(resume_from_checkpoint=True)
|
240 |
#else:
|
241 |
-
train_result = trainer.
|
242 |
trainer.push_to_hub(commit_message="Training complete!")
|
243 |
except Exception as e:
|
244 |
return f"An error occurred: {str(e)}, TB: {traceback.format_exc()}"
|
|
|
220 |
|
221 |
|
222 |
#print(train_set.keys())
|
|
|
223 |
|
224 |
|
225 |
#data_collator = DataCollatorForSeq2Seq(tokenizer, model=model)
|
|
|
237 |
#if os.path.exists(training_args.output_dir) and os.listdir(training_args.output_dir):
|
238 |
#train_result = trainer.train(resume_from_checkpoint=True)
|
239 |
#else:
|
240 |
+
train_result = trainer.train()
|
241 |
trainer.push_to_hub(commit_message="Training complete!")
|
242 |
except Exception as e:
|
243 |
return f"An error occurred: {str(e)}, TB: {traceback.format_exc()}"
|