facebookresearch / CompilerGym

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

Add fork implementation to sqlite wrapper #758

Closed ricardoprins closed 1 year ago

ricardoprins commented 1 year ago

Fixes #744.

I'm just confused about what kind of test should be added due to this change.

codecov-commenter commented 1 year ago

Codecov Report

Merging #758 (21b2e62) into development (ca8c58a) will increase coverage by 0.12%. The diff coverage is 50.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #758      +/-   ##
===============================================
+ Coverage        89.10%   89.23%   +0.12%     
===============================================
  Files              130      130              
  Lines             7859     7859              
===============================================
+ Hits              7003     7013      +10     
+ Misses             856      846      -10     
Impacted Files Coverage Δ
compiler_gym/wrappers/sqlite_logger.py 92.40% <50.00%> (ø)
...ompiler_gym/service/client_service_compiler_env.py 90.87% <0.00%> (+0.63%) :arrow_up:
compiler_gym/service/connection.py 79.59% <0.00%> (+1.00%) :arrow_up:
compiler_gym/envs/llvm/datasets/cbench.py 80.57% <0.00%> (+1.07%) :arrow_up:
compiler_gym/envs/llvm/datasets/poj104.py 76.81% <0.00%> (+1.44%) :arrow_up:
ChrisCummins commented 1 year ago

I would suggest a test that does this:

  1. Create a sqlite env
  2. Make a step, flush the env, check that the step was written to database.
  3. Fork the env.
  4. Make a step in both different environments, flush both, check that both steps were written to the database.

Cheers, Chris

ChrisCummins commented 1 year ago

Hi @ricardoprins, are you still interested in working on this?

ChrisCummins commented 1 year ago

Closing this due to lack of activity.