Skip to content

Instantly share code, notes, and snippets.

@piercelamb
Created December 19, 2022 22:51
Show Gist options
  • Save piercelamb/f052f350a36727cb76de0560bed66894 to your computer and use it in GitHub Desktop.
Save piercelamb/f052f350a36727cb76de0560bed66894 to your computer and use it in GitHub Desktop.
training_metrics_initialize
t_total = len(train_dataloader) * num_train_epochs # total number of training steps
if accelerator.is_main_process:
print("Total number of training steps ", t_total)
train_eval_data = {
'train_loss_history': [],
'valid_acc_history': [],
'valid_f1_history': [],
}
best_f1 = 0
best_acc = 0
curr_best_model = model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment