Skip to content

Commit 131cc5c

Browse files
author
Patrick Miles
committed
resolve paths in cli to make config() behavior
1 parent 4554490 commit 131cc5c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ScaFFold/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,14 @@ def main():
181181
combined_config["unet_layers"] = (
182182
combined_config["problem_scale"] - combined_config["unet_bottleneck_dim"] + 1
183183
)
184+
185+
# Resolve paths to absolute, matching Config() behavior
186+
if "base_run_dir" in combined_config and combined_config["base_run_dir"]:
187+
combined_config["base_run_dir"] = str(Path(combined_config["base_run_dir"]).resolve())
184188

189+
if "dataset_dir" in combined_config and combined_config["dataset_dir"]:
190+
combined_config["dataset_dir"] = str(Path(combined_config["dataset_dir"]).resolve())
191+
185192
# Calculate these variables after override
186193
combined_config["vol_size"] = pow(2, combined_config["problem_scale"])
187194
combined_config["point_num"] = int(combined_config["vol_size"] ** 3 / 256)

0 commit comments

Comments
 (0)