facebookresearch / Pearl

A Production-ready Reinforcement Learning AI Agent Library brought by the Applied Reinforcement Learning team at Meta.
MIT License
2.67k stars 165 forks source link

Replace asserts with torch.testing asserts in test_linear_bandits.py #84

Closed alexnikulkov closed 6 months ago

alexnikulkov commented 6 months ago

Summary: Regular asserts don't print an informative message when they fail. Replacing with torch.testing asserts, which print out useful information for debugging

Differential Revision: D56588249

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.19%. Comparing base (e38f01b) to head (11639d6).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #84 +/- ## ======================================= Coverage 79.19% 79.19% ======================================= Files 171 171 Lines 6546 6547 +1 ======================================= + Hits 5184 5185 +1 Misses 1362 1362 ``` | [Flag](https://app.codecov.io/gh/facebookresearch/Pearl/pull/84/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/facebookresearch/Pearl/pull/84/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) | `79.19% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.