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

Add links to collab #7854

Merged
merged 6 commits into from
Aug 18, 2023
Merged

Add links to collab #7854

merged 6 commits into from
Aug 18, 2023

Conversation

NicolasHug
Copy link
Member

Closes #7794

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 18, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7854

Note: Links to docs will display an error until the docs builds have been completed.

❌ 27 New Failures, 1 Unrelated Failure

As of commit 5dbb99d with merge base 90e0b79 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

# We override sphinx-gallery's example header to prevent sphinx-gallery from
# creating a note at the top of the renderred notebook.
# https://github.com/sphinx-gallery/sphinx-gallery/blob/451ccba1007cc523f39cbcc960ebc21ca39f7b75/sphinx_gallery/gen_rst.py#L1267-L1271
# This is because we also want to add a link to google collab, so we write our own note in each example.
Copy link
Member Author

@NicolasHug NicolasHug Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick explanation

sphinx-gallery adds this note by default on top of each example:

image

We want to add links to collab, and I want to avoid having 2 notes. So I removed the note automatically added by sphinx-gallery and manually added it on each example, along with the "try on collab" link. It now looks like this:

image

It's a bit more work but I think it's worth it. Looks like this is the recommended way to do it sphinx-gallery/sphinx-gallery#978

@@ -3,6 +3,10 @@
Optical Flow: Predicting movement with the RAFT model
=====================================================

.. note::
Try on `collab <https://colab.research.google.com/github/pytorch/vision/blob/gh-pages/main/_generated_ipynb_notebooks/plot_optical_flow.ipynb>`_
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that all links point to main. I don't know how to point to the current version, not sure it's worth it.

I think that in the tutorials repo they literally have a separate ipynb file which always get outdated... That sounds a lot worse.

Copy link
Contributor

@pmeier pmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Nicolas.

@NicolasHug NicolasHug merged commit 59b27ed into pytorch:main Aug 18, 2023
16 of 43 checks passed
@github-actions
Copy link

Hey @NicolasHug!

You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

facebook-github-bot pushed a commit that referenced this pull request Sep 6, 2023
Summary: (Note: this ignores all push blocking failures!)

Reviewed By: matteobettini

Differential Revision: D48900382

fbshipit-source-id: b9f0dca20bcbb33e309d9250bc71da3520048175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

try on collab link
3 participants