diff --git a/janus_core/training/preprocess.py b/janus_core/training/preprocess.py index 11b3b08b..dcfc0be0 100644 --- a/janus_core/training/preprocess.py +++ b/janus_core/training/preprocess.py @@ -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")