-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the state map for ensembles #6797
Conversation
a5843d7
to
260198c
Compare
cd1d739
to
2efa80c
Compare
2efa80c
to
7109b65
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6797 +/- ##
==========================================
- Coverage 83.79% 83.79% -0.01%
==========================================
Files 368 368
Lines 21684 21660 -24
Branches 948 948
==========================================
- Hits 18171 18149 -22
+ Misses 3219 3217 -2
Partials 294 294 ☔ View full report in Codecov by Sentry. |
7a1676e
to
390defc
Compare
prior_ensemble=ensemble_1, | ||
) | ||
assert _cases(storage) == ["foo1", "foo2"] | ||
assert ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both this test and test_create_ensemble_from_prior
end with the same assert. Is it enough to have one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Not really needed with two tests here
@@ -62,11 +61,7 @@ def test_simulation_context(setup_case, storage, monkeypatch, try_queue_and_sche | |||
assert even_ctx.didRealizationSucceed(iens) | |||
assert not even_ctx.didRealizationFail(iens) | |||
assert even_ctx.isRealizationFinished(iens) | |||
|
|||
assert even_half.state_map[iens] == RealizationStorageState.HAS_DATA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a different assert here or OK to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be safe to remove as this test only simulates and not run any analysis thus has no data
else: | ||
assert odd_ctx.didRealizationSucceed(iens) | ||
assert not odd_ctx.didRealizationFail(iens) | ||
assert odd_ctx.isRealizationFinished(iens) | ||
|
||
assert odd_half.state_map[iens] == RealizationStorageState.HAS_DATA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a different assert here or OK to remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
active_realizations: List[bool], | ||
) -> int: | ||
"""Returns the number of loaded realizations""" | ||
pool = ThreadPool(processes=8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why 8 threads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just moved this code so I dont know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments.
Great work 👍
deb173d
to
4cdfe3e
Compare
4cdfe3e
to
a2ad95d
Compare
Issue
Resolves #6736
Approach
Remove the state map from local_ensemble.py. This is replaced by checking the state based on the actual files present in the ensemble directory on disk. We also store any errors with a possible error message on disk in the ensemble.
Pre review checklist
Ground Rules),
and changes to existing code have good test coverage.
Pre merge checklist