Skip to content

Commit

Permalink
keep track of best_val_loss
Browse files Browse the repository at this point in the history
  • Loading branch information
jaidhyani committed Mar 7, 2024
1 parent 6856bed commit ae9d8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/delphi/train/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ def train_step(
)
iter_num += 1
local_iter_num += 1
return False, t0, iter_num, local_iter_num
return False, t0, iter_num, local_iter_num, best_val_loss


for epoch in range(config.max_epochs):
train_ds.shuffle(epoch)
train_batch_iter = iter(DataLoader(train_ds, batch_size=config.batch_size)) # type: ignore
for _ in tqdm(range(num_steps)):
breaknow, t0, iter_num, local_iter_num = train_step(
breaknow, t0, iter_num, local_iter_num, best_val_loss = train_step(
train_ds,
validation_ds,
lr_decay_iters,
Expand Down

0 comments on commit ae9d8e6

Please sign in to comment.