Skip to content

Commit

Permalink
Update progress bar info on total number of reals
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Sep 13, 2024
1 parent 3495366 commit 838861c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ert/run_models/base_run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,11 @@ def get_memory_consumption(self) -> int:

def _current_progress(self) -> tuple[float, int]:
current_iter = max(list(self._iter_snapshot.keys()))
done_realizations = 0
done_realizations = self.active_realizations.count(False)
all_realizations = self._iter_snapshot[current_iter].reals
current_progress = 0.0
realization_count = len(all_realizations)
# realization_count = len(all_realizations)
realization_count = len(self.active_realizations)

if all_realizations:
for real in all_realizations.values():
Expand All @@ -404,7 +405,10 @@ def _current_progress(self) -> tuple[float, int]:
]:
done_realizations += 1

realization_progress = float(done_realizations) / len(all_realizations)
# realization_progress = float(done_realizations) / len(all_realizations)
realization_progress = float(done_realizations) / len(
self.active_realizations
)
current_progress = (
(current_iter + realization_progress) / self._total_iterations
if self._total_iterations != 1
Expand Down

0 comments on commit 838861c

Please sign in to comment.