-
Notifications
You must be signed in to change notification settings - Fork 128
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 support for granular timeouts #283
Comments
Hi @ChrisCummins, I would like to help fix this issue. Is this only applicable for "llvm_env_test.py" or other files as well? |
Hi @Hrittik20, great, thanks for your interest! This task will require updating a number of methods. I've updated the "Pitch" section to list the main ones, which you will find in Cheers, |
Hi @ChrisCummins, I'd like to work on this. |
Great, thanks @ricardoprins! |
Hi, In defining the kwarg will we want to preserve a timeout default of 300, as it is here? CompilerGym/compiler_gym/service/connection.py Lines 46 to 49 in 641e8cf
|
Yep, that's right! Cheers, |
🚀 Feature
The compiler environment uses timeouts on all operations. These timeouts are controlled by a
ConnectionOpts
class, which is default-constructed by the constructor. This feature request proposes adding the ability for user code to override these timeouts on a per-method basis by passing in antimeout
kwarg to operations that can timeout.Motivation
Timeout specification is currently very coarse-grained. E.g.
ConnectionOpts. rpc_call_max_seconds
specifies the timeout of all RPC operations, regardless of what the operation is, the size of the benchmark that is being processed, etc. A timeout that would be suitable for a fast operation like ending a session would be totally unsuitable for a slow operation like applying a long sequence of expensive actions on a large benchmark. Currently the only way to tweak these timeouts to match the different calls is to manually change theenv.service.opts
fields in between method calls, e.g.:Pitch
Add an optional
timeout
kwarg so that timeouts can be overriden on a per-method basis:The following methods would receive this new argument:
compiler_gym.envs.CompilerEnv.step
compiler_gym.envs.CompilerEnv.multistep
compiler_gym.envs.CompilerEnv.reset
compiler_gym.envs.CompilerEnv.__init__
All subclasses / wrappers would need to handle this too.
Alternatives
We could also consider ditching the ConnectionOpts class entirely and pushing all of the configurable options out to the individual methods, but I see there are two drawbacks to this approach:
The text was updated successfully, but these errors were encountered: