Skip to content

Commit

Permalink
Merge branch 'develop' into LLPR_universal
Browse files Browse the repository at this point in the history
  • Loading branch information
SanggyuChong committed Sep 17, 2024
2 parents ae3b644 + 7a475fb commit aac749e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions mace/tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,17 @@ def train(
if rank == 0:
if valid_loss >= lowest_loss:
patience_counter += 1
if patience_counter >= patience and epoch < swa.start:
logging.info(
f"Stopping optimization after {patience_counter} epochs without improvement and starting Stage Two"
)
epoch = swa.start
elif patience_counter >= patience and epoch >= swa.start:
logging.info(
f"Stopping optimization after {patience_counter} epochs without improvement"
)
break
if patience_counter >= patience:
if swa is not None and epoch < swa.start:
logging.info(
f"Stopping optimization after {patience_counter} epochs without improvement and starting Stage Two"
)
epoch = swa.start
else:
logging.info(
f"Stopping optimization after {patience_counter} epochs without improvement"
)
break
if save_all_checkpoints:
param_context = (
ema.average_parameters()
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ packages = find:
python_requires = >=3.7
install_requires =
torch>=1.12
e3nn==0.4.4
e3nn
numpy<2.0
opt_einsum
ase
Expand Down

0 comments on commit aac749e

Please sign in to comment.