def __init__(self, *, max_to_keep: int = 4, save_dir: Optional[str] = None) -> None: self.max_to_keep = max_to_keep if save_dir is None: save_dir = os.path.join(get_run_dir(), "checkpoints") self.save_dir = fs.normpath(save_dir)
def __init__(self, scalar: str, *, name: Optional[str] = None, save_dir: Optional[str] = None) -> None: self.scalar = scalar if name is None: name = self.extreme + '-' + scalar.replace('/', '-') self.name = name if save_dir is None: save_dir = os.path.join(get_run_dir(), 'checkpoints') self.save_dir = fs.normpath(save_dir)
def __init__( self, scalar: str, split: str = None, *, name: Optional[str] = None, save_dir: Optional[str] = None, ) -> None: self.scalar = scalar self.split = split if split is not None else "0" if name is None: name = self.extreme + "-" + scalar.replace("/", "-") if split is not None: name += "-" + split self.name = name if save_dir is None: save_dir = os.path.join(get_run_dir(), "checkpoints") self.save_dir = fs.normpath(save_dir)
def __init__(self, load_dir: Optional[str] = None) -> None: if load_dir is None: load_dir = os.path.join(get_run_dir(), 'checkpoints') self.load_dir = fs.normpath(load_dir)
def __init__(self, save_dir: Optional[str] = None) -> None: if save_dir is None: save_dir = os.path.join(get_run_dir(), 'summary') self.save_dir = fs.normpath(save_dir)
def __init__(self, *, save_dir: Optional[str] = None) -> None: if save_dir is None: save_dir = os.path.join(get_run_dir(), 'tensorboard') self.save_dir = fs.normpath(save_dir)