facebookresearch / ReAgent

A platform for Reasoning systems (Reinforcement Learning, Contextual Bandits, etc.)
https://reagent.ai
BSD 3-Clause "New" or "Revised" License
3.58k stars 521 forks source link

Pass SummaryWriter to Offline Eval class to log metrics #705

Closed alexnikulkov closed 1 year ago

alexnikulkov commented 1 year ago

Summary: Pass SummaryWriter to offline evaluators, so that they could log metrics to TensorBoard

Differential Revision: D42251660

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D42251660

codecov-commenter commented 1 year ago

Codecov Report

Base: 87.70% // Head: 87.72% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (950589a) compared to base (ceac47a). Patch coverage: 97.05% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #705 +/- ## ========================================== + Coverage 87.70% 87.72% +0.01% ========================================== Files 373 373 Lines 24011 24039 +28 Branches 44 44 ========================================== + Hits 21060 21088 +28 Misses 2925 2925 Partials 26 26 ``` | [Impacted Files](https://codecov.io/gh/facebookresearch/ReAgent/pull/705?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch) | Coverage Δ | | |---|---|---| | [reagent/training/cb/base\_trainer.py](https://codecov.io/gh/facebookresearch/ReAgent/pull/705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-cmVhZ2VudC90cmFpbmluZy9jYi9iYXNlX3RyYWluZXIucHk=) | `84.44% <50.00%> (ø)` | | | [reagent/evaluation/cb/base\_evaluator.py](https://codecov.io/gh/facebookresearch/ReAgent/pull/705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-cmVhZ2VudC9ldmFsdWF0aW9uL2NiL2Jhc2VfZXZhbHVhdG9yLnB5) | `93.47% <100.00%> (+2.56%)` | :arrow_up: | | [reagent/evaluation/cb/policy\_evaluator.py](https://codecov.io/gh/facebookresearch/ReAgent/pull/705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-cmVhZ2VudC9ldmFsdWF0aW9uL2NiL3BvbGljeV9ldmFsdWF0b3IucHk=) | `95.83% <100.00%> (ø)` | | | [reagent/test/evaluation/cb/test\_integration.py](https://codecov.io/gh/facebookresearch/ReAgent/pull/705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-cmVhZ2VudC90ZXN0L2V2YWx1YXRpb24vY2IvdGVzdF9pbnRlZ3JhdGlvbi5weQ==) | `100.00% <100.00%> (ø)` | | | [...eagent/test/evaluation/cb/test\_policy\_evaluator.py](https://codecov.io/gh/facebookresearch/ReAgent/pull/705/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch#diff-cmVhZ2VudC90ZXN0L2V2YWx1YXRpb24vY2IvdGVzdF9wb2xpY3lfZXZhbHVhdG9yLnB5) | `97.29% <100.00%> (+0.37%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=facebookresearch)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

facebook-github-bot commented 1 year ago

This pull request has been merged in facebookresearch/ReAgent@2e72fdcc006d52156f9cf2f3a241e7090416c21c.