Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ScaFFold/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,24 @@ def main():
print(f"Overriding '{key}={combined_config[key]}' with '{key}={value}'")
combined_config[key] = value

# Recalculate unet_layers to capture any CLI overrides
combined_config["unet_layers"] = (
combined_config["problem_scale"]
- combined_config["unet_bottleneck_dim"]
+ 1
)

# Resolve paths to absolute, matching Config() behavior
if "base_run_dir" in combined_config and combined_config["base_run_dir"]:
combined_config["base_run_dir"] = str(
Path(combined_config["base_run_dir"]).resolve()
)

if "dataset_dir" in combined_config and combined_config["dataset_dir"]:
combined_config["dataset_dir"] = str(
Path(combined_config["dataset_dir"]).resolve()
)

# Calculate these variables after override
combined_config["vol_size"] = pow(2, combined_config["problem_scale"])
combined_config["point_num"] = int(combined_config["vol_size"] ** 3 / 256)
Expand Down