-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add post/pre experiment simulation hooks #8993
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good, but think we need to adjust the timing a bit. Also it seems to be missing for some experiment types. Though we should not run the PRE_EXPERIMENT
hooks for restart runs and evaluate_experiment´ and none of them for
manual_update. Also need to add documentation for when these are run, and for which run model. There is another test:
test_model_hook_order` which should proably assert this.
self.set_env_key("_ERT_ITERATION", "0") | ||
self.set_env_key("_IS_FINAL_ITERATION", "False") |
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.
Not related to hooks, so suggest removing these.
|
||
run_args = create_run_arguments( | ||
self.run_paths, | ||
np.array(self.active_realizations, dtype=bool), | ||
ensemble=self.ensemble, | ||
) | ||
|
||
self.run_workflows(HookRuntime.PRE_EXPERIMENT, self._storage, self.ensemble) |
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.
Suggest moving this to before we create anything, so basically right after:
self.log_at_startup()
self._evaluate_and_postprocess( | ||
run_args, | ||
self.ensemble, | ||
evaluator_server_config, | ||
) | ||
self.run_workflows(HookRuntime.POST_EXPERIMENT, self._storage, self.ensemble) |
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 not give storage and ensemble here (they are optional further down in the callstack, so just need to modify the typing)
b51ecfb
to
155e4cd
Compare
155e4cd
to
687513a
Compare
Issue
Resolves #7644