Skip to content

Commit

Permalink
Address first comments
Browse files Browse the repository at this point in the history
  • Loading branch information
frostedoyster committed Feb 1, 2024
1 parent cf069fb commit 75c1408
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/metatensor/models/cli/export_model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argparse
from typing import Optional

from metatensor.torch.atomistic import MetatensorAtomisticModel

Expand Down Expand Up @@ -35,7 +34,7 @@ def _add_export_model_parser(subparser: argparse._SubParsersAction) -> None:
)


def export_model(model: str, output: Optional[str]) -> None:
def export_model(model: str, output: str = "exported-model.pt") -> None:
"""Export a pretrained model to run MD simulations
:param model: Path to a saved model
Expand All @@ -47,7 +46,4 @@ def export_model(model: str, output: Optional[str]) -> None:

# Export the model
wrapper = MetatensorAtomisticModel(loaded_model.eval(), loaded_model.capabilities)
if output is None:
wrapper.export("exported-model.pt")
else:
wrapper.export(output)
wrapper.export(output)
2 changes: 1 addition & 1 deletion src/metatensor/models/cli/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def train_model(options: DictConfig) -> None:
outputs=outputs,
)

logger.info("Calling model trainer")
logger.info("Calling architecture trainer")
model = architecture.train(
train_datasets=[train_dataset],
validation_datasets=[validation_dataset],
Expand Down

0 comments on commit 75c1408

Please sign in to comment.