Skip to content

Commit

Permalink
trainer: Don't swallow exceptions during previews
Browse files Browse the repository at this point in the history
  • Loading branch information
mdraw committed Aug 10, 2017
1 parent da5b648 commit 71914ce
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions elektronn2/training/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,8 @@ def run(self):
save_time2 += config.prev_save_h
try:
self.preview_slice(**exp_config.preview_kwargs)
except:
logger.warning("Preview Predictions failed."
"Are the preview raw data in "
"the correct format?")
except Exception as e:
logger.exception("Preview Predictions failed.")
# reset time because we only count training time
# not time spent for previews (making previews
# is not a computational payload of the actual
Expand Down Expand Up @@ -869,10 +867,8 @@ def run(self):
save_time2 += config.prev_save_h
try:
self.preview_slice(**exp_config.preview_kwargs)
except:
logger.warning("Preview Predictions failed."
"Are the preview raw data in "
"the correct format?")
except Exception as e:
logger.exception("Preview Predictions failed.")
# reset time because we only count training time
# not time spent for previews (making previews
# is not a computational payload of the actual
Expand Down Expand Up @@ -1169,10 +1165,8 @@ def run(self):
save_time2 += config.prev_save_h
try:
self.preview_slice(**exp_config.preview_kwargs)
except:
logger.warning("Preview Predictions failed."
"Are the preview raw data in "
"the correct format?")
except Exception as e:
logger.exception("Preview Predictions failed.")
# reset time because we only count training time
# not time spent for previews (making previews
# is not a computational payload of the actual
Expand Down

0 comments on commit 71914ce

Please sign in to comment.