Skip to content

Commit

Permalink
Route has_data through get_ensemble_state()
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 26, 2024
1 parent 9c3d2ee commit 8b31351
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ert/storage/local_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,12 @@ def has_data(self) -> List[int]:
exists : List[int]
Returns the realization numbers with responses
"""

ensemble_state = self.get_ensemble_state()
return [
i
for i in range(self.ensemble_size)
if all(
(self._realization_dir(i) / f"{response}.parquet").exists()
or (config.has_finalized_keys and config.keys == [])
for response, config in self.experiment.response_configuration.items()
)
if RealizationStorageState.RESPONSES_LOADED in ensemble_state[i]
]

def realizations_initialized(self, realizations: List[int]) -> bool:
Expand Down

0 comments on commit 8b31351

Please sign in to comment.