Skip to content

Commit

Permalink
Remove unnecessary callback resets in validation and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tshu-w committed Sep 29, 2024
1 parent dcc53fd commit 5e3aa73
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/callbacks/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ def teardown(

val_metrics = {}
if trainer.validate_loop._data_source.is_defined():
trainer.callbacks = []
trainer.validate(**fn_kwargs)
val_metrics = convert_tensors_to_scalars(trainer.logged_metrics)

test_metrics = {}
if trainer.test_loop._data_source.is_defined():
trainer.callbacks = []
trainer.test(**fn_kwargs)
test_metrics = convert_tensors_to_scalars(trainer.logged_metrics)

Expand Down

0 comments on commit 5e3aa73

Please sign in to comment.