Skip to content
Snippets Groups Projects
Commit f74d57dc authored by Hamid Shojanazeri's avatar Hamid Shojanazeri
Browse files

printing scores based on fsdp usage or single gpu

parent 3d887ea4
No related branches found
No related tags found
No related merge requests found
......@@ -153,7 +153,11 @@ def train(model, train_dataloader,eval_dataloader, tokenizer, optimizer, lr_sche
if eval_epoch_loss < best_val_loss:
best_val_loss = eval_epoch_loss
print(f"best eval loss on epoch {epoch} is {best_val_loss}")
if train_config.enable_fsdp:
if rank==0:
print(f"best eval loss on epoch {epoch} is {best_val_loss}")
else:
print(f"best eval loss on epoch {epoch} is {best_val_loss}")
val_loss.append(best_val_loss)
val_prep.append(eval_ppl)
......
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