tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Render images in certain Blitz, Basics, and Youtube tutorial notebooks

Open kiersten-stokes opened this issue 2 years ago • 6 comments

This PR adds a root image path to the sphinx_gallery_conf dict according to these instructions given in the Sphinx Gallery docs. It also updates the corresponding relative paths in the image directives in certain Blitz, Basics, and Youtube tutorials.

Related to #791. I'm not going to link a 'closing' keyword yet, as this PR 1. addresses just a subset of the tutorials, and 2. may not be a viable solution (pending testing on the deploy preview).

Since this is affecting a project conf that I may not have historical knowledge as to why this wasn't used previously, I fully understand if we're not able to incorporate this one!

kiersten-stokes avatar Feb 21 '23 23:02 kiersten-stokes

Deploy Preview for pytorch-tutorials-preview ready!

Name Link
Latest commit 38818c7751eb222588d73c61778975def8a1e277
Latest deploy log https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/63f80a530ff7a800071e71ee
Deploy Preview https://deploy-preview-2213--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.

netlify[bot] avatar Feb 21 '23 23:02 netlify[bot]

I have a question for someone more knowledgeable than me (@svekars 🙂). After building with make html, the notebook file created in the _build/html/_downloads directory looks like the below screenshot, with the image rendered as expected.

Screenshot 2023-02-21 at 5 40 51 PM

Is this the version notebook that would be available via the Run in Colab link once (hypothetically) the PR is merged?

kiersten-stokes avatar Feb 21 '23 23:02 kiersten-stokes

Thanks, Kiersten. I'm not sure why we'd want this and what's the actual value. Can you please elaborate?

svekars avatar Feb 24 '23 00:02 svekars

Can you please elaborate?

@svekars I should have included some screenshots in my description! Basically, while the built-in images are displayed in the HTML with no issue, they are not currently displayed in the notebook files.

Example of what is displayed in the Colab notebook now:

Screenshot 2023-02-24 at 10 25 09 AM

vs the HTML display:

Screenshot 2023-02-24 at 10 25 48 AM

These changes make it so that the the image is viewable in both the HTML and the notebook files (well, depending on the answer to the question I posed in this comment).

shown here in notebook form (though not in Colab obviously)

Screenshot 2023-02-24 at 10 29 20 AM

Definitely not a 'need-to-have' by any means but figured I would propose it since there was a corresponding issue!

kiersten-stokes avatar Feb 24 '23 16:02 kiersten-stokes

Oh, I see. This definetely looks useful, although I'm not 100% sure if this would work. Let me check around and get back to you.

svekars avatar Feb 24 '23 21:02 svekars

Oh, I see. This definetely looks useful, although I'm not 100% sure if this would work. Let me check around and get back to you.

@svekars any update? No hurry, just suddenly remembered that I had this one open 😄

kiersten-stokes avatar Mar 10 '23 18:03 kiersten-stokes

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

github-actions[bot] avatar Sep 26 '24 00:09 github-actions[bot]