facebookresearch / CompilerGym

Reinforcement learning environments for compiler and program optimization tasks
https://compilergym.ai/
MIT License
906 stars 127 forks source link

Implementation of State Transition Dataset Wrapper #678

Closed vladaindjic closed 2 years ago

vladaindjic commented 2 years ago

❓ Questions and Help

Hi, @ChrisCummins ,

Sorry to interrupt. While reading the CompilerGym paper, I encountered on the State Transition Dataset Wrapper "that asynchronously populates the Steps and Observations tables of a state transition database upon every step of an environment." The populated dataset is then used for offline training. Unfortunately, I could not find the implementation of the wrapper inside this repository. Could you please guide me to the place where I could find the implementation of this wrapper?

Thanks in advance.

Kind regards, Vladimir

Additional Context

ChrisCummins commented 2 years ago

Hey @vladaindjic, good question. I haven't get got around to open sourcing it. Let me copy over the version from my internal repo now

ChrisCummins commented 2 years ago

Okay, I filed #679. It's the wrapper I used to generate the dataset we released, and isn't super extensible. If you want to change what is recorded, you would need to hack on the source. One caveat - this is a synchronous implementation - so the overhead of storing entries is added to compiler interactions. The async implementation still needs more work and tweaking.

Cheers, Chris

vladaindjic commented 2 years ago

Hi, @ChrisCummins ,

Thanks a lot for your prompt response. :) No problem if some hack needs to be applied in order to adapt the wrapper.

Cheers, Vladimir