Skip to content
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

Render a non-empty plot in Mario-RL tutorial #2401

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

kiersten-stokes
Copy link
Contributor

@kiersten-stokes kiersten-stokes commented Jun 1, 2023

Fixes #1607

Description

This PR makes a few changes in order to render a non-empty plot in the doc HTML.

  • Ups the number of episodes run so that there are enough data points to plot (w/ 10 episodes, only one data point would be available due to a save every 20)
  • Clears the plot at the beginning of the loop that plots all 4 metrics; this ensure the plot is not cleared on the final iteration and results in something being displayed
  • Adds a legend to the plot so that the rendered image contains some context and isn't just a random straight line

New rendering:
Screenshot 2023-06-01 at 1 52 23 PM

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

cc @vmoens @nairbv @svekars @carljparker

@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
🔨 Latest commit 1ab2486
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/6479002f00c8e70008e43397
😎 Deploy Preview https://deploy-preview-2401--pytorch-tutorials-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added rl Issues related to reinforcement learning tutorial, DQN, and so on website Issues related to website rendering docathon-h1-2023 A label for the docathon in H1 2023 medium and removed cla signed labels Jun 1, 2023
@kiersten-stokes
Copy link
Contributor Author

Interestingly, in the deploy preview I'm not getting any image render (see screenshot below). But I suppose this still fixes the original issue

Screenshot 2023-06-01 at 1 58 28 PM

@svekars
Copy link
Contributor

svekars commented Jun 1, 2023

Will need to wait for the manager worker to finish and check in the build artifacts. Netlify only runs the simple make html-noplot without actually running the code and generating outputs. It's a quick preview for .rst/HTML only fixes.

@svekars svekars merged commit e2a7ab0 into pytorch:main Jun 1, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docathon-h1-2023 A label for the docathon in H1 2023 medium rl Issues related to reinforcement learning tutorial, DQN, and so on website Issues related to website rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank image in Mario-RL tutorial
3 participants