I am concerned that the current logic for ksp_interface_loop.observation_handshake used between ksp_interface_loop and AgentEnvRunner.policy_loop may cause old/stale observations to be processed by AgentEnvRunner.policy_loop.
In particular, see how AgentEnvRunner.policy_loop receives messages from the observation_handshake (in v0.11.1): https://github.com/mit-ll/spacegym-kspdg/blob/v0.11.1/src/kspdg/agent_api/runner.py#L125
If there are multiple messages in this pipe, wouldn't this if statement get the oldest one? Shouldn't it use something like a while statement to make sure it's clearing the pipe and processing the newest observation?
I am concerned that the current logic for
ksp_interface_loop.observation_handshakeused betweenksp_interface_loopandAgentEnvRunner.policy_loopmay cause old/stale observations to be processed byAgentEnvRunner.policy_loop.In particular, see how
AgentEnvRunner.policy_loopreceives messages from the observation_handshake (in v0.11.1): https://github.com/mit-ll/spacegym-kspdg/blob/v0.11.1/src/kspdg/agent_api/runner.py#L125If there are multiple messages in this pipe, wouldn't this if statement get the oldest one? Shouldn't it use something like a
whilestatement to make sure it's clearing the pipe and processing the newest observation?