-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Get timers from subprocess #2268
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
Conversation
@@ -625,6 +627,7 @@ def _get_state(self, output: UnityRLOutput) -> Tuple[AllBrainInfo, bool]: | |||
) | |||
return _data, global_done | |||
|
|||
@timed | |||
def _generate_step_input( |
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.
What is the purpose of timing this in addition to timing the env.step time here? I thought we intend to benchmark the communication time, which is the self.communicator.exchange function that calls this function.
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 put it there because that's where the protobuf serialization occurs. I'll put one on RpcCommunicator.communicate too.
Aside from my only comment, all seems reasonable to me. |
Extends the previous timer code to return the timer from the subprocess workers, and merge them into the timer tree.
Deciding to represent this is the hardest part. Instead of trying to track real/user time, I went with a simpler approach of flagging the nodes that are run in parallel; this is set when merging the trees.