From 6719849e754d81e715ab6712e008d6d637b938ac Mon Sep 17 00:00:00 2001 From: CompRhys Date: Wed, 25 Sep 2024 16:08:42 -0400 Subject: [PATCH] doc: improve the warning messages and fix typo --- mace/calculators/mace.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mace/calculators/mace.py b/mace/calculators/mace.py index c74bfd24..81a8c986 100644 --- a/mace/calculators/mace.py +++ b/mace/calculators/mace.py @@ -5,6 +5,7 @@ ########################################################################################### +import logging from glob import glob from pathlib import Path from typing import Union @@ -64,12 +65,15 @@ def __init__( Calculator.__init__(self, **kwargs) if "model_path" in kwargs: + deprecation_message = ( + "'model_path' argument is deprecated, please use 'model_paths'" + ) if model_paths is None: - print("model_path argument deprecated, use model_paths") + logging.warning(f"{deprecation_message} in the future.") model_paths = kwargs["model_path"] else: raise ValueError( - "both 'model_path' and 'model_paths' argument give, please only pass model_paths" + f"both 'model_path' and 'model_paths' given, {deprecation_message} only." ) if (model_paths is None) == (models is None):