From d3bcc47aa66862b8dbd9dc1c8b4aaca3e0c867e1 Mon Sep 17 00:00:00 2001 From: jmusiel <73840022+jmusiel@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:51:35 +0000 Subject: [PATCH] add mae_descending online learner param --- finetuna/online_learner/online_learner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/finetuna/online_learner/online_learner.py b/finetuna/online_learner/online_learner.py index 3f8d41d..f18e213 100644 --- a/finetuna/online_learner/online_learner.py +++ b/finetuna/online_learner/online_learner.py @@ -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) @@ -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