[WIP] Add an in-process CompilerGymService for python backends#727
[WIP] Add an in-process CompilerGymService for python backends#727ChrisCummins wants to merge 9 commits intofacebookresearch:developmentfrom
Conversation
This adds a new class, `compiler_gym.spaces.ActionSpace`, that wraps
the existing `env.action_space` types, and provides a pair of methods
`to_string()` and `from_string()` for serializing and deserializing
to/from string, respectively. This replaces the old
`CompilerEnv.commandline()` method, which has been marked deprecated
and will be removed in a future release.
To update your code, replace:
env.commandline()
With:
env.action_space.to_string(env.actions)
And replace:
env.actions_from_commandline("...")
With:
env.action_space.from_string("...")
The reason for this change is that "command line" is a specialized
term that does not make sense for all compiler environments. The new
ActionSpace class also provides default implementations of `to_string()`
and `from_string()`, so there is no need to implement these two
methods when providing a new backend. As a result, the LoopToolEnv
class has been removed.
This was deprecated in v0.2.1.
Remove a handful of things that were deprecated several releases back.
|
Hi @ChrisCummins! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
A new
CompilerEnvimplementation that doesn't use gRPC but instantiates and calls methods onCompilationSessiondirectly.Work-in-progress, there will be bugs.
cc @dejangrubisic