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

Add async calls #27

Open
wants to merge 2 commits into
base: 0.3
Choose a base branch
from
Open

Add async calls #27

wants to merge 2 commits into from

Conversation

RyanNavillus
Copy link

Add async call to arbitrary env functions

@RyanNavillus
Copy link
Author

This is a bit buggy, fixing it now

@RyanNavillus
Copy link
Author

Ok I fixed the bugs, but now there's a bit of an implementation issue. If you use the same request/response queue for arbitrary calls and steps/resets then it complicates the interface. Since the main evaluate function calls send() at the end of the loop, there is usually data sitting in the response queue until the next time evaluate() is called. This means that if you call async_call(), it will receive the observation data from the previous evaluate call instead of its own outputs, which inevitably leads to errors.

I think the best solution is to just create a separate call queue, but maybe there's a way to rewrite the evaluate code so that it doesn't leave data in the queues.

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.

1 participant