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

Negative input values for n_processes in the MultiprocessingEvaluator result in fatal errors #188

Closed
EwoutH opened this issue Oct 5, 2022 · 0 comments · Fixed by #189
Closed
Assignees
Labels
Milestone

Comments

@EwoutH
Copy link
Collaborator

EwoutH commented Oct 5, 2022

PR #140 introduced a feature for the MultiprocessingEvaluator to take a negative input for n_processes, which initialize the evaluator with the cpu_count minus that negative integer, leaving that number of cores free.

In 7dd1610 this code was refactored, introducing a bug that broke the negative-integer input functionality. When a negative integer is inputted, a AttributeError: 'MultiprocessingEvaluator' object has no attribute 'n_processes' was created.

The bug was caused by self.n_processes begin used instead of n_processes, where in earlier code self.n_processes was set equal to n_processes earlier in the process.

Unfortunately this bug landed in the EMAworkbench 2.2.0 release.

@EwoutH EwoutH added the bug label Oct 5, 2022
@EwoutH EwoutH added this to the 2.3.0 milestone Oct 5, 2022
@EwoutH EwoutH self-assigned this Oct 5, 2022
EwoutH referenced this issue Oct 5, 2022
all code for processes is now contained in the init and an extra check for windows is added were the max number of processes cannot be higher then 61 at the moment (is still true in python 3.10)
@EwoutH EwoutH modified the milestones: 2.3.0, 2.2.1 Oct 5, 2022
@EwoutH EwoutH changed the title Number of processes in the MultiprocessingEvaluator is broken. Negative input values for n_processes in the MultiprocessingEvaluator result in fatal errors Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant