Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue where callback_metrics was replaced instead of updated #492

Merged
merged 1 commit into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/evaluation_loop_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def run_evaluation(self, test=False):
self.log_metrics(log_metrics, {})

# track metrics for callbacks
self.callback_metrics = callback_metrics
self.callback_metrics.update(callback_metrics)

# hook
model.on_post_performance_check()
Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/train_loop_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def optimizer_closure():
all_log_metrics = {k: v for d in all_log_metrics for k, v in d.items()}

# track all metrics for callbacks
self.callback_metrics = {k: v for d in all_callback_metrics for k, v in d.items()}
self.callback_metrics.update({k: v for d in all_callback_metrics for k, v in d.items()})

return 0, grad_norm_dic, all_log_metrics

Expand Down