Пример #1
0
 def _check_checkpoint(self: TrainerType,
                       ckpt: Optional[str]) -> Optional[str]:
     if ckpt is None:
         return ckpt
     if system.is_url(ckpt):
         ckpt = system.download_url(cast(str, ckpt), self.checkpoint_dir)
     ckpt = os.path.join(self.checkpoint_dir, ckpt)
     return ckpt
Пример #2
0
 def _check_checkpoint(self: TrainerType,
                       ckpt: Optional[str]) -> Optional[str]:
     if system.is_url(ckpt):
         ckpt = system.download_url(cast(str, ckpt), self.checkpoint_dir)
     return ckpt