From 950b5760547d59d358139346c9133ecb582fd2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Kavanagh?= <51478689+kavanase@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:12:42 -0400 Subject: [PATCH 1/3] Update nequip/train/trainer.py Alby review point 2 Co-authored-by: Alby M. <1473644+Linux-cpp-lisp@users.noreply.github.com> --- nequip/train/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nequip/train/trainer.py b/nequip/train/trainer.py index 21c7199d..d421c68d 100644 --- a/nequip/train/trainer.py +++ b/nequip/train/trainer.py @@ -1156,7 +1156,7 @@ def _parse_n_train_n_val( train_dataset_size if n_name == "n_train" else val_dataset_size ) n_train_n_val.append( - (float(n.strip("%")) / 100) * dataset_size + (float(n.rstrip("%")) / 100) * dataset_size ) # convert to float first elif isinstance(n, int): n_train_n_val.append(n) From f05b395ad9ae8f51945e692073d695748fad5c80 Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Thu, 27 Jun 2024 11:12:53 -0400 Subject: [PATCH 2/3] Alby review --- nequip/train/trainer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nequip/train/trainer.py b/nequip/train/trainer.py index 21c7199d..ffa177c9 100644 --- a/nequip/train/trainer.py +++ b/nequip/train/trainer.py @@ -1149,12 +1149,12 @@ def _parse_n_train_n_val( ) -> tuple[int]: # parse n_train and n_val (can be ints or str with percentage): n_train_n_val = [] - for n_name in ["n_train", "n_val"]: + for n_name, dataset_size in ( + ("n_train", train_dataset_size), + ("n_val", val_dataset_size), + ): n = getattr(self, n_name) if isinstance(n, str) and "%" in n: - dataset_size = ( - train_dataset_size if n_name == "n_train" else val_dataset_size - ) n_train_n_val.append( (float(n.strip("%")) / 100) * dataset_size ) # convert to float first From 7e1ff56b5d243d8ce87ec379295fbcba419e36fc Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Thu, 27 Jun 2024 11:19:32 -0400 Subject: [PATCH 3/3] Revert "Avoid unnecessary e3nn-related JIT warning" (be22479f), fixed upstream by @Linux-cpp-lisp in https://github.com/e3nn/e3nn/pull/437 --- nequip/scripts/train.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nequip/scripts/train.py b/nequip/scripts/train.py index 02460aad..7ba1538b 100644 --- a/nequip/scripts/train.py +++ b/nequip/scripts/train.py @@ -24,10 +24,6 @@ from nequip.utils._global_options import _set_global_options from nequip.scripts._logger import set_up_script_logger -warnings.filterwarnings( # unnecessary e3nn-related JIT warning - "ignore", - message="The TorchScript type system doesn't support instance-level annotations", -) default_config = dict( root="./", tensorboard=False,