-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allow to spawn workers inside daemon #1067
base: develop
Are you sure you want to change the base?
Conversation
return i | ||
|
||
|
||
def has_pytorch(): |
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.
🤨
self.pool_config = state["pool_config"] | ||
backend = self.pool_config.get("backend") | ||
n_workers = self.pool_config.get("n_workers", -1) | ||
self.pool = PoolExecutor.BACKENDS.get(backend, ThreadPool)(n_workers) |
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'm a bit unsure about this part. If the object is serialized and passed to the subprocess, the deserialization step will have the effect or creating another pool of n_workers, no?
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.
yea
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.
we maybe able to pass a queue instead to avoid creating multiple pools
but nesting the executor in general is a bit of a nono
No description provided.