Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 7, 2025
1 parent 2ef45ab commit 2bcb683
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dpgen2/exploration/report/report_adaptive_lower.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def record(
# accurate set is substracted by the candidate set
self.accur = self.accur - self.candi
self.model_devi = model_devi
self._no_candidate = (len(self.candi) == 0)
self._no_candidate = len(self.candi) == 0
self._failed_ratio = float(len(self.failed)) / float(self.nframes)
self._accurate_ratio = float(len(self.accur)) / float(self.nframes)
self._candidate_ratio = float(len(self.candi)) / float(self.nframes)
Expand Down
14 changes: 10 additions & 4 deletions dpgen2/exploration/report/report_trust_levels_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,16 @@ def record(
assert len(self.traj_accu) == ntraj
assert len(self.traj_fail) == ntraj
self.model_devi = model_devi
self._no_candidate = (sum([len(ii) for ii in self.traj_cand]) == 0)
self._failed_ratio = float(sum([len(ii) for ii in self.traj_fail])) / float(sum(self.traj_nframes))
self._accurate_ratio = float(sum([len(ii) for ii in self.traj_accu])) / float(sum(self.traj_nframes))
self._candidate_ratio = float(sum([len(ii) for ii in self.traj_cand])) / float(sum(self.traj_nframes))
self._no_candidate = sum([len(ii) for ii in self.traj_cand]) == 0
self._failed_ratio = float(sum([len(ii) for ii in self.traj_fail])) / float(
sum(self.traj_nframes)
)
self._accurate_ratio = float(sum([len(ii) for ii in self.traj_accu])) / float(
sum(self.traj_nframes)
)
self._candidate_ratio = float(sum([len(ii) for ii in self.traj_cand])) / float(
sum(self.traj_nframes)
)

def _get_indexes(
self,
Expand Down

0 comments on commit 2bcb683

Please sign in to comment.