Skip to content

Commit

Permalink
Fix preprocess config
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Nov 7, 2024
1 parent 6a95423 commit d99f717
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions janus_core/training/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,17 @@ def preprocess(
if logger and "foundation_model" in options:
logger.info("Fine tuning model: %s", options["foundation_model"])

# Path must be passed as a string
mlip_args = mace_parser().parse_args(["--config", str(mlip_config)])
# Parse options from config, as MACE cannot read config file yet
args = []
for key, value in options.items():
if isinstance(value, bool):
if value is True:
args.append(f"--{key}")
else:
args.append(f"--{key}")
args.append(f"{value}")

mlip_args = mace_parser().parse_args(args)

if logger:
logger.info("Starting preprocessing")
Expand Down

0 comments on commit d99f717

Please sign in to comment.