facebookresearch / CompilerGym

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

Rename id attribute for rewards to "name" #565

Closed parthchadha closed 2 years ago

parthchadha commented 2 years ago

This PR renames the id attribute in Reward class to name to be consistent with other space classes.

Fixes #381

codecov-commenter commented 2 years ago

Codecov Report

Merging #565 (b2ff595) into development (e248330) will decrease coverage by 8.46%. The diff coverage is 75.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #565      +/-   ##
===============================================
- Coverage        88.11%   79.65%   -8.47%     
===============================================
  Files              114      114              
  Lines             6689     6689              
===============================================
- Hits              5894     5328     -566     
- Misses             795     1361     +566     
Impacted Files Coverage Δ
compiler_gym/envs/gcc/gcc_rewards.py 100.00% <ø> (ø)
compiler_gym/envs/llvm/llvm_env.py 81.81% <ø> (-5.46%) :arrow_down:
compiler_gym/envs/loop_tool/__init__.py 70.00% <ø> (-20.00%) :arrow_down:
compiler_gym/leaderboard/llvm_instcount.py 92.78% <ø> (ø)
compiler_gym/wrappers/llvm.py 97.91% <ø> (ø)
compiler_gym/spaces/reward.py 60.78% <50.00%> (-11.77%) :arrow_down:
compiler_gym/views/reward.py 96.55% <75.00%> (ø)
compiler_gym/bin/manual_env.py 80.73% <100.00%> (ø)
compiler_gym/bin/validate.py 87.09% <100.00%> (ø)
compiler_gym/envs/compiler_env.py 85.78% <100.00%> (-5.74%) :arrow_down:
... and 28 more

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 e248330...b2ff595. Read the comment docs.

ChrisCummins commented 2 years ago

Hi Parth, thank you for this, it looks great! I'll just wait to get the "all clear" from our CI tests before merging.

Cheers, Chris

ChrisCummins commented 2 years ago

Tests pass, merged! 👍 Thanks @parthchadha for your first contribution to CompilerGym! 🎉 🎉

Cheers, Chris

parthchadha commented 2 years ago

Tests pass, merged! 👍 Thanks @parthchadha for your first contribution to CompilerGym! 🎉 🎉

Cheers, Chris

Thanks Chris! Looking forward to making more contributions to CompilerGym 🚀