-
Notifications
You must be signed in to change notification settings - Fork 2
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
Example fails when run with --release #1
Comments
I looked into the issue. I believe to cause is the code running too quickly in release, so the server gets sent too many requests, and can't keep up (The rust bindings for the gym server are not the best), but I could be wrong. I tried seeing if adding something like while let Err(..) = obs { /* blah */ } and making multiple attempts until one worked would fix the issue, but that solved nothing. For the moment, the best I can think of is to just only run the gym examples in debug. |
That makes sense. The http client is creating a new connection for every request, which is certainly suboptimal. Is there an easy way to make hyper reuse connections? It seems Keep-Alive is enabled by default: |
I don't know Hyper too well, but that's on the latest version. The bindings for the server use an earlier version where is seems you have to set this manually. I tried editing a local copy of the bindings code to include a call to |
I took another look at this issue to see if I good figure anything out, but no luck. I'm not sure there's a way to avoid this error without editing the server code (I don't know a lot about flask or servers in general so I'm not 100% sure what the options are here), but we might not have to avoid the error. The error causing this to abort doesn't crash the server, so we should be able to just wait a little bit after receiving it and then continue with buisness as usual. It seems to me that a good long term solution (which would take a while to implement) is to just add better error checking into the library. Define some |
The cartpole example works fine when I run the debug build, but if I run with
--release
, there seems to be a communication problem with the gym server:The text was updated successfully, but these errors were encountered: