Skip to content

Refactor and add tests to TotalBatchRewardPerEpisode #830

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

Merged

Conversation

jeremiahpslewis
Copy link
Member

PR Checklist

  • Update NEWS.md?

@jeremiahpslewis jeremiahpslewis requested a review from HenriDeh March 9, 2023 11:04
@jeremiahpslewis jeremiahpslewis requested a review from HenriDeh March 9, 2023 15:04
HenriDeh
HenriDeh previously approved these changes Mar 10, 2023
@jeremiahpslewis
Copy link
Member Author

@HenriDeh Ok, one more trick: Base.show overloading so the hook itself prints the plot in the REPL (if the plot mode is activated). Thoughts?

@HenriDeh HenriDeh merged commit 41f86dc into JuliaReinforcementLearning:main Mar 13, 2023
@HenriDeh
Copy link
Member

I made the merge

@jeremiahpslewis
Copy link
Member Author

Nice, thanks!

Mytolo pushed a commit to Mytolo/ReinforcementLearning.jl that referenced this pull request Mar 23, 2023
…entLearning#830)

* Make TotalRewardPerEpisode immutable

* tweak struct

* Simplify TotalBatchRewardPerEpisode

* test scaffold

* Finish off TotalBatchRewardPerEpisode

* Add noop test for stages

* Fix tests

* Tests pass!

* Fix using Ref

* Fix tests

* Ref issues

* Test fix

* Update docstring

* Support ref

* Fix test

* Drop ref approach, use mutable

* Fix tests

* Tweak type dispatch to use Val{...}

* Drop excess bracket

* Fix dispatch

* Overload show method

* Fix val dispatch, use show overload better
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants