Skip to content

Commit

Permalink
add mae_descending online learner param
Browse files Browse the repository at this point in the history
  • Loading branch information
jmusiel committed Oct 31, 2023
1 parent f7c7a77 commit d3bcc47
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions finetuna/online_learner/online_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def init_learner_params(self):
self.mae_threshold = self.learner_params.get("mae_threshold", None)
if self.mae_threshold is not None:
self.mae_unsafe = True
self.mae_descending = self.learner_params.get("mae_descending", False)

self.ml_energy_only = self.learner_params.get("ml_energy_only", False)

Expand Down Expand Up @@ -318,6 +319,8 @@ def get_energy_and_forces(self, atoms, precalculated=False):
self.mae_unsafe = True
else:
self.mae_unsafe = False
if self.mae_descending:
self.mae_threshold = self.info["retrained_forces_l2mae"]

else:
# Otherwise use the ML predicted energies and forces
Expand Down

0 comments on commit d3bcc47

Please sign in to comment.