Skip to content

Commit

Permalink
fix: deactivation of model evaluation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
flxst committed May 17, 2024
1 parent 435ab82 commit df76a09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/modalities/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ def evaluate(
evaluation_result=evaluation_result,
)
result_dict[data_loader.dataloader_tag] = evaluation_result

model.train()

return result_dict

@staticmethod
Expand Down
1 change: 0 additions & 1 deletion src/modalities/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def train(
)
thoughput_aggregator.remove_keys()

model.train()
cumulated_losses = self._reset_tracked_losses()

evaluation_callback(train_step_id=train_step_id)
Expand Down

0 comments on commit df76a09

Please sign in to comment.