Skip to content
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

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

Conversation

ChrisCummins
Copy link
Contributor

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.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 4, 2022
@ChrisCummins ChrisCummins added this to the v0.2.3 milestone Mar 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2022

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%) ⬇️
compiler_gym/views/observation_space_spec.py 85.71% <0.00%> (-3.58%) ⬇️
compiler_gym/views/observation.py 97.29% <0.00%> (-2.71%) ⬇️
compiler_gym/envs/compiler_env.py 91.33% <0.00%> (-1.00%) ⬇️
compiler_gym/envs/gcc/service/gcc_service.py 96.70% <0.00%> (-0.37%) ⬇️

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.

@ChrisCummins ChrisCummins force-pushed the fix/cbench-validate-return-type branch from 0c685b4 to cd838bb Compare March 7, 2022 10:21
@ChrisCummins ChrisCummins merged commit 15dcc39 into facebookresearch:development Mar 7, 2022
@ChrisCummins ChrisCummins deleted the fix/cbench-validate-return-type branch March 7, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants