Skip to content

added processes arg to executor call#22

Open
stevenmikes wants to merge 1 commit into
paulknysh:masterfrom
stevenmikes:master
Open

added processes arg to executor call#22
stevenmikes wants to merge 1 commit into
paulknysh:masterfrom
stevenmikes:master

Conversation

@stevenmikes

Copy link
Copy Markdown

Using a distributed job submission platform to submit the function evaluation calls to a cluster. It seemed that the number of evaluations run in parallel was lower than what I set it to with the "batch" parameter. Reading through the Python doc for multiprocessing.Pool, the default for the processes argument is the number of cores on the local machine. Setting processes=batch solved the problem, allowing the number of evaluations set to run in parallel.

@paulknysh

paulknysh commented Jun 9, 2020

Copy link
Copy Markdown
Owner

So, I was thinking about your change - here is the problem. executor has parameter processes only if it's Pool (default executor). But code in general case accepts any executor from user, including custom ones. Those executors might not have processes parameter (or it would be called something else).. Do you agree?

Do you think it would be possible to refactor your change such that it only affects default executor and not all executors? Perhaps by adding processes argument into get_default_executor() function.

@stevenmikes

stevenmikes commented Jun 9, 2020 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants