def save_cache(self, args, chunks, epoch, verbose=True):
    (path, key_path) = self.get_cache_path_run(args, epoch)
    dt = {'epoch': self.epoch, 'base_lr': self.base_lr, 'model': self.model.state_dict()}
    if verbose:
        print('saved cache file: {}'.format(Path(path).stem))
    torch.save(dt, path)
    keys = [Path(p).stem for p in chunks]
    dump_json(keys, key_path)
def save_cache(self, args, chunks, epoch, verbose=True):
    (path, key_path) = self.get_cache_path_run(args, epoch)
    dt = {'epoch': self.epoch, 'base_lr': self.base_lr, 'model': self.model.state_dict()}
    if verbose:
        print('saved cache file: {}'.format(Path(path).stem))
    torch.save(dt, path)
    keys = [Path(p).stem for p in chunks]
    dump_json(keys, key_path)