Skip to content
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

Fix failure when using pbs driver #2689

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

sondreso
Copy link
Collaborator

@sondreso sondreso commented Jan 11, 2022

Issue
Resolves #2687

Approach
Move _on_task_failure function out of PrefectEnsemble

The reference to self._on_task_failure caused the entire PrefectEnsemble
to be pickled. This is not intended, nor is it safe, in particular
because the Executor might contain thread locks. This commit moves the
_on_task_failure function out of the PrefectEnsemble object, and rather
binds only the ee_id before the task is pickled.

Pre review checklist

  • Added appropriate labels

Adding labels helps the maintainers when writing release notes, see sections and the
corresponding labels here: https://github.com/equinor/ert/blob/main/.github/release.yml

@sondreso sondreso self-assigned this Jan 11, 2022
The reference to self._on_task_failure caused the entire PrefectEnsemble
to be pickled. This is not intended, nor is it safe, in particular
because the Executor might contain thread locks. This commit moves the
_on_task_failure function out of the PrefectEnsemble object, and rather
binds only the ee_id before the task is pickled.
Copy link
Contributor

@markusdregi markusdregi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hereby approve these changes!

@sondreso sondreso enabled auto-merge (rebase) January 12, 2022 08:04
@sondreso sondreso merged commit ebe2dc6 into equinor:main Jan 12, 2022
@sondreso sondreso deleted the fix-pbs-driver-failure branch January 12, 2022 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polynomial demo fails when running with pbs driver
2 participants