Skip to content
Snippets Groups Projects
Unverified Commit 761b7e6e authored by Hamid Shojanazeri's avatar Hamid Shojanazeri Committed by GitHub
Browse files

adding wandb_run ro eval

parent ffdc93f0
No related branches found
No related tags found
No related merge requests found
......@@ -169,7 +169,7 @@ def train(model, train_dataloader,eval_dataloader, tokenizer, optimizer, lr_sche
lr_scheduler.step()
if train_config.run_validation:
eval_ppl, eval_epoch_loss, temp_val_loss, temp_step_perplexity = evaluation(model, train_config, eval_dataloader, local_rank, tokenizer)
eval_ppl, eval_epoch_loss, temp_val_loss, temp_step_perplexity = evaluation(model, train_config, eval_dataloader, local_rank, tokenizer, wandb_run)
if train_config.save_metrics:
val_step_loss.extend(temp_val_loss)
val_step_perplexity.extend(temp_step_perplexity)
......@@ -492,4 +492,4 @@ def save_to_json(output_filename, train_step_loss, train_epoch_loss, train_step_
"val_epoch_perplexity": val_epoch_ppl
}
with open(output_filename, "w") as f:
json.dump(metrics_data, f)
\ No newline at end of file
json.dump(metrics_data, f)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment