Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit 8bee473

Browse files
warn about batch_len_schedule when resuming
1 parent b0dfa37 commit 8bee473

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

notochord/notochord/train.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,12 @@ class Resumable:
262262
def __init__(self, checkpoint=None, **kw):
263263
if checkpoint is not None:
264264
d = torch.load(checkpoint, map_location=torch.device('cpu'))
265+
print(f'loaded checkpoint {checkpoint}')
266+
if d['kw'].get('batch_len_schedule') is not None: print("""
267+
warning: checkpoints don't track `batch_len`.
268+
be sure to manually set batch_len if resuming a run
269+
using `batch_len_schedule`
270+
""")
265271
# merges sub dicts, e.g. model hyperparameters
266272
deep_update(d['kw'], kw)
267273
self._trainer = Trainer(**d['kw'])

0 commit comments

Comments
 (0)