diff --git a/pyproject.toml b/pyproject.toml index 12dd7b594..1a250ca7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "ase", "torch", "hydra-core", - "rascaline-torch @ git+https://github.com/luthaf/rascaline#subdirectory=python/rascaline-torch", + #"rascaline-torch @ git+https://github.com/luthaf/rascaline#subdirectory=python/rascaline-torch", "metatensor-core", "metatensor-operations", "metatensor-torch", diff --git a/src/metatensor/models/cli/eval_model.py b/src/metatensor/models/cli/eval_model.py index eb8c62f17..b247d0dbb 100644 --- a/src/metatensor/models/cli/eval_model.py +++ b/src/metatensor/models/cli/eval_model.py @@ -59,7 +59,6 @@ def eval_model( :param structure_path: Path to a structure file which should be considered for the evaluation. :param output_path: Path to save the predicted values - """ model = load_model(model_path) diff --git a/src/metatensor/models/cli/export_model.py b/src/metatensor/models/cli/export_model.py index 5d97ea191..0ba8ee35d 100644 --- a/src/metatensor/models/cli/export_model.py +++ b/src/metatensor/models/cli/export_model.py @@ -2,14 +2,41 @@ def _add_export_model_parser(subparser: argparse._SubParsersAction) -> None: + if export_model.__doc__ is not None: + description = export_model.__doc__.split(r":param")[0] + else: + description = None + parser = subparser.add_parser( "export", - description=export_model.__doc__, + description=description, formatter_class=argparse.ArgumentDefaultsHelpFormatter, ) parser.set_defaults(callable="export_model") + parser.add_argument( + "-m", + "--model", + dest="model_path", + type=str, + required=True, + help="Path to a saved model", + ) + parser.add_argument( + "-o", + "--output", + dest="output_path", + type=str, + required=False, + default="exported.pt", + help="Export path for the model.", + ) + + +def export_model(model_path: str, output_path: str) -> None: + """Export a pretrained model to run MD simulations -def export_model(): - """export a model""" - print("Run exort...") + :param model_path: Path to a saved model + :param output_path: Path to save the exported model + """ + raise NotImplementedError("model exporting is not implemented yet.")