-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add mountain car reward heatmap and reward-vs-time plotters #177
Conversation
Codecov Report
@@ Coverage Diff @@
## master #177 +/- ##
==========================================
+ Coverage 85.63% 87.89% +2.25%
==========================================
Files 64 67 +3
Lines 4519 4683 +164
==========================================
+ Hits 3870 4116 +246
+ Misses 649 567 -82
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good. One change I'd suggest in your style is using explicit matplotlib Figure
and Axes
objects, rather than depending on the global state in matplotlib
. This is more flexible and less error prone. Otherwise fairly minor comments.
Thanks for the review. I've unsuccessfully attempted before to figure out how to gracefully use the OOP interface to matplotlib, so it was good to learn a cleaner way to manage these plots. It's a pain for me to manually check whether plots are working so I'm going to write a smoke test of some sort. Ask for another round of review after then. |
Needs to be in package for importing, testing and otherwise.
I moved some reward-related helper functions and To make the functions importable and testable, I moved mountain_car_plots.py from This should be ready for another round of review now. |
Allows implicit namespace packages (PEP 420). https://setuptools.readthedocs.io/en/latest/setuptools.html#find-namespace-packages
This reverts commit 78eabf6.
Somehow, this branch is set off the Sacred race condition that is fixed by IDSIA/sacred#473 4 out of 5 times I reran tests. Maybe this is bad luck on my part (in one of the reruns, |
I think it would be really helpful for me if Sacred configs were picklable. This would allow us to upgrade to a version of Sacred that doesn't run into the FileStorageObserver race condition when I'm running local experiments, and let me use the same version of Sacred that is used by the Minecraft project. Asked on IDSIA/sacred#508 if all they need is just dropping in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, new OO-style for matplotlib
much easier to understand, and +1 for tests.
There's a few minor changes I've suggested but coding as approve since no need for me to review again.
Co-Authored-By: Adam Gleave <adam@gleave.me>
Co-Authored-By: Adam Gleave <adam@gleave.me>
Putting the Heatmap / reward vs time plotting code from my ipynb into a python file.
Not sure if
experiments/
is the best place to put this. Maybeimitation.scripts
is better since the user might want to import these plotting functions into another file.While translating the code from one format to another, I found some bugs, related yet again to VecNormalize. In this case it seems like my reward functions might not have actually received normalized inputs.
So I'd expect heatmaps to look different upon a new run.