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

[Refactor] Extract worker logic out of ProcessEnvironment #913 #939

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

breakds
Copy link
Contributor

@breakds breakds commented Jul 19, 2021

This is a refactor PR that does not incur any logic change

Motivation

This is part of the effort to unblock #913. Two reasons for this change

  1. worker definitely does not rely on ProcessEnvironment at all, and therefore it is cleaner to make it independent of ProcessEnvironment.
  2. If it stays as a member method of ProcessEnvironment, multiprocess.Process will get stuck on start() if the parent process is also a multiprocess.Process, for unknown reason though (tried investigation but haven't figured out).

runjerry
runjerry previously approved these changes Jul 21, 2021
Base automatically changed from PR_extract_message_type to pytorch July 21, 2021 22:35
This is part of the effort to unblock #913. Two reasons for this change

1. `worker` definitely does not rely on `ProcessEnvironment` at all, and therefore it is cleaner to make it independent of `ProcessEnvironment`.
2. If it stays as a member method of `ProcessEnvironment`, `multiprocess.Process` will get stuck on `start()` if the parent process is also a `multiprocess.Process`, for unknown reason though (tried investigation but haven't figured out).
@breakds
Copy link
Contributor Author

breakds commented Jul 22, 2021

Updated with just a rebase.

@breakds breakds merged commit f2d378a into pytorch Jul 22, 2021
@hnyu hnyu deleted the PR_extract_proc_env_worker branch July 26, 2021 00:51
pd-perry pushed a commit to pd-perry/alf that referenced this pull request Dec 11, 2021
…orizonRobotics#939)

This is part of the effort to unblock HorizonRobotics#913. Two reasons for this change

1. `worker` definitely does not rely on `ProcessEnvironment` at all, and therefore it is cleaner to make it independent of `ProcessEnvironment`.
2. If it stays as a member method of `ProcessEnvironment`, `multiprocess.Process` will get stuck on `start()` if the parent process is also a `multiprocess.Process`, for unknown reason though (tried investigation but haven't figured out).
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.

3 participants