Skip to content

Commit

Permalink
Fix premature abort warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
mittagessen committed Nov 28, 2023
1 parent 8ed41dc commit ba4c81f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kraken/ketos/pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def pretrain(ctx, batch_size, pad, output, spec, load, freq, quit, epochs,
logger.warning('Model did not improve during training.')
ctx.exit(1)

if not model.epoch:
if not model.current_epoch:
logger.warning('Training aborted before end of first epoch.')
ctx.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion kraken/ketos/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def train(ctx, batch_size, pad, output, spec, append, load, freq, quit, epochs,
logger.warning('Model did not improve during training.')
ctx.exit(1)

if not model.epoch:
if not model.current_epoch:
logger.warning('Training aborted before end of first epoch.')
ctx.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion kraken/ketos/ro.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def rotrain(ctx, batch_size, output, load, freq, quit, epochs, min_epochs, lag,
logger.warning('Model did not improve during training.')
ctx.exit(1)

if not model.epoch:
if not model.current_epoch:
logger.warning('Training aborted before end of first epoch.')
ctx.exit(1)

Expand Down
2 changes: 1 addition & 1 deletion kraken/ketos/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def segtrain(ctx, output, spec, line_width, pad, load, freq, quit, epochs,
logger.warning('Model did not improve during training.')
ctx.exit(1)

if not model.epoch:
if not model.current_epoch:
logger.warning('Training aborted before end of first epoch.')
ctx.exit(1)

Expand Down

0 comments on commit ba4c81f

Please sign in to comment.