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

Test for stale observations due to observation_handshake #28

Open
rallen10 opened this issue Jan 6, 2025 · 0 comments
Open

Test for stale observations due to observation_handshake #28

rallen10 opened this issue Jan 6, 2025 · 0 comments

Comments

@rallen10
Copy link
Collaborator

rallen10 commented Jan 6, 2025

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?

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

No branches or pull requests

1 participant