Skip to content

Commit

Permalink
Make style
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson committed Nov 13, 2023
1 parent ebd9173 commit 8eddf02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2112,10 +2112,10 @@ def _pick_target_avg_loss(self, keep_avg_target: KeepAverage) -> Dict:
if "target_loss" in self.config and self.config.target_loss:
if f"avg_{self.config.target_loss}" in keep_avg_target.avg_values.keys():
return keep_avg_target[f"avg_{self.config.target_loss}"]
else:
raise ValueError(
" [!] Target loss not found in the keep_avg_target. You might be exiting the training loop before it is computed or set the target_loss in the model config incorrectly."
)

raise ValueError(
" [!] Target loss not found in the keep_avg_target. You might be exiting the training loop before it is computed or set the target_loss in the model config incorrectly."
)

# take the average of loss_{optimizer_idx} as the target loss when there are multiple optimizers
if isinstance(self.optimizer, list):
Expand Down

0 comments on commit 8eddf02

Please sign in to comment.