Skip to content

Commit

Permalink
remove logging during model building
Browse files Browse the repository at this point in the history
  • Loading branch information
cw-tan committed Oct 21, 2024
1 parent 47dde9a commit 86dfc35
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions nequip/model/_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
Config,
)
from nequip.utils.config import _GLOBAL_ALL_ASKED_FOR_KEYS
from nequip.utils.logger import RankedLogger

import hydra

logger = RankedLogger(__name__, rank_zero_only=True)
import warnings


default_config = dict(
Expand Down Expand Up @@ -71,12 +69,8 @@ def model_from_config(
# average number of neighbors normalization check
avg_num_neighbors = config.get("avg_num_neighbors", None)
if avg_num_neighbors is None:
logger.info(
"Found `avg_num_neighbors`=None -- it is recommended to set `avg_num_neighbors` for normalization and better numerics during training."
)
else:
logger.info(
f"Normalization of `avg_num_neighbors`={avg_num_neighbors} will be used to build the network."
warnings.warn(
"Found `avg_num_neighbors=None` -- it is recommended to set `avg_num_neighbors` for normalization and better numerics during training."
)

model_dtype: torch.dtype = dtype_from_name(config["model_dtype"])
Expand Down

0 comments on commit 86dfc35

Please sign in to comment.