ModelCheckpoint._save_checkpoint calls braintools.file.msgpack_from_state_dict(checkpoint, filepath), but that function restores a state dict into a target (signature (target, state)); it does not serialize to a file. Saving a checkpoint through this callback raises.
Location: braintools/trainer/_callbacks.py (ModelCheckpoint._save_checkpoint).
Fix: use braintools.file.msgpack_save(filepath, checkpoint).
Found while adding test coverage (#90).
ModelCheckpoint._save_checkpointcallsbraintools.file.msgpack_from_state_dict(checkpoint, filepath), but that function restores a state dict into a target (signature(target, state)); it does not serialize to a file. Saving a checkpoint through this callback raises.Location:
braintools/trainer/_callbacks.py(ModelCheckpoint._save_checkpoint).Fix: use
braintools.file.msgpack_save(filepath, checkpoint).Found while adding test coverage (#90).