Skip to content

Commit

Permalink
fix prog bar
Browse files Browse the repository at this point in the history
  • Loading branch information
mwalmsley committed Jan 16, 2024
1 parent 5c4c84b commit 53974da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zoobot/pytorch/estimators/define_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ def update_other_metrics(self, outputs, step_name):
def log_all_metrics(self, subset=None):
if subset is not None:
for metric_collection in (self.loss_metrics, self.question_loss_metrics, self.campaign_loss_metrics):
prog_bar = metric_collection == self.loss_metrics
for name, metric in metric_collection.items():
if subset in name:
logging.info(name)
self.log(name, metric, on_epoch=True, on_step=False, prog_bar=True, logger=True)
self.log(name, metric, on_epoch=True, on_step=False, prog_bar=prog_bar, logger=True)
else: # just log everything
self.log_dict(self.loss_metrics, on_epoch=True, on_step=False, prog_bar=True, logger=True)
self.log_dict(self.question_loss_metrics, on_step=False, on_epoch=True, logger=True)
Expand Down

0 comments on commit 53974da

Please sign in to comment.