Skip to content

Commit

Permalink
RESUME with output the same as config dir
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanklut committed Jan 31, 2024
1 parent 36a9c13 commit 32c6834
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,10 @@ def setup_cfg(args, cfg: Optional[CfgNode] = None) -> CfgNode:
_uuid = uuid.uuid4()
cfg.LAYPA_UUID = str(_uuid)

version_path = Path("version_info")

cfg.LAYPA_GIT_HASH = get_git_hash()

cfg.CONFIG_PATH = str(Path(args.config).resolve())
config_path = Path(args.config).resolve()
cfg.CONFIG_PATH = str(config_path)

if not hasattr(args, "train"):
pass
Expand Down Expand Up @@ -131,6 +130,9 @@ def setup_cfg(args, cfg: Optional[CfgNode] = None) -> CfgNode:
folder_name.append(cfg.NAME)
cfg.OUTPUT_DIR = os.path.join(cfg.OUTPUT_DIR, "_".join(folder_name))

if cfg.MODEL.RESUME:
cfg.OUTPUT_DIR = str(config_path.parent)

# Overwrite device based on detected hardware
if cfg.MODEL.DEVICE:
# If CUDA device cannot be found, default to CPU
Expand Down

0 comments on commit 32c6834

Please sign in to comment.