facebookresearch / CompilerGym

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

[cbench] Fix return type of Benchmark.validate(). #604

Closed ChrisCummins closed 2 years ago

ChrisCummins commented 2 years ago

Fixes a regression in cBench validators. The validator should return an iterable of ValidationError, not an Optional[ValidationError]. Since I don't have a testcase to cover that, I only discovered the problem by breaking a program.

I should follow up with a new testcase.

codecov-commenter commented 2 years ago

Codecov Report

Merging #604 (0c685b4) into development (d5d60b6) will decrease coverage by 0.16%. The diff coverage is 69.23%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #604      +/-   ##
===============================================
- Coverage        88.26%   88.10%   -0.17%     
===============================================
  Files              114      114              
  Lines             6708     6715       +7     
===============================================
- Hits              5921     5916       -5     
- Misses             787      799      +12     
Impacted Files Coverage Δ
compiler_gym/bin/validate.py 87.09% <66.66%> (ø)
compiler_gym/envs/llvm/datasets/cbench.py 79.42% <70.00%> (-1.32%) :arrow_down:
compiler_gym/views/observation_space_spec.py 85.71% <0.00%> (-3.58%) :arrow_down:
compiler_gym/views/observation.py 97.29% <0.00%> (-2.71%) :arrow_down:
compiler_gym/envs/compiler_env.py 91.33% <0.00%> (-1.00%) :arrow_down:
compiler_gym/envs/gcc/service/gcc_service.py 96.70% <0.00%> (-0.37%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d5d60b6...0c685b4. Read the comment docs.