Skip to content

Commit

Permalink
Merge pull request #3423 from idiap/fix-aux-tests
Browse files Browse the repository at this point in the history
Fix CI (save best model after 0 steps in tests)
  • Loading branch information
erogol authored Dec 14, 2023
2 parents 186cafb + 99fee6f commit 55c7063
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions TTS/bin/train_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def evaluation(model, criterion, data_loader, global_step):

def train(model, optimizer, scheduler, criterion, data_loader, eval_data_loader, global_step):
model.train()
best_loss = float("inf")
best_loss = {"train_loss": None, "eval_loss": float("inf")}
avg_loader_time = 0
end_time = time.time()
for epoch in range(c.epochs):
Expand Down Expand Up @@ -248,7 +248,7 @@ def train(model, optimizer, scheduler, criterion, data_loader, eval_data_loader,
)
# save the best checkpoint
best_loss = save_best_model(
eval_loss,
{"train_loss": None, "eval_loss": eval_loss},
best_loss,
c,
model,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pandas>=1.4,<2.0
# deps for training
matplotlib>=3.7.0
# coqui stack
trainer>=0.0.32
trainer>=0.0.36
# config management
coqpit>=0.0.16
# chinese g2p deps
Expand Down

0 comments on commit 55c7063

Please sign in to comment.