Skip to content

Commit

Permalink
Merge pull request #131 from Modalities/fix/deactivate-model-eval
Browse files Browse the repository at this point in the history
fix: deactivation of model evaluation mode
  • Loading branch information
mali-git authored May 21, 2024
2 parents 435ab82 + df76a09 commit 2b562b1
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 2b562b1

Please sign in to comment.