-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into wwen/nightly-torch-ex…
…port-redirect
- Loading branch information
Showing
100 changed files
with
985 additions
and
6,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#Checks links in a PR to ensure they are valid. If link is valid but failing, it can be added to the .lycheeignore file | ||
#Use the skip-link-check label on a PR to skip checking links on a PR | ||
|
||
name: link check on PR | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Get Changed Files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v41 | ||
|
||
- name: Check for Skip Label | ||
id: skip-label | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const labels = await github.rest.issues.listLabelsOnIssue({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.issue.number | ||
}); | ||
return labels.data.some(label => label.name === 'skip-link-check'); | ||
- name: Check Links | ||
if: steps.skip-label.outputs.result == 'false' | ||
uses: lycheeverse/lychee-action@v1 | ||
with: | ||
args: --accept=200,403,429 --base . --verbose --no-progress ${{ steps.changed-files.outputs.all_changed_files }} | ||
token: ${{ secrets.CUSTOM_TOKEN }} | ||
fail: true | ||
|
||
- name: Skip Message | ||
if: steps.skip-label.outputs.result == 'true' | ||
run: echo "Link check was skipped due to the presence of the 'skip-link-check' label." | ||
|
||
- name: Suggestions | ||
if: failure() | ||
run: | | ||
echo -e "\nPlease review the links reported in the Check links step above." | ||
echo -e "If a link is valid but fails due to a CAPTCHA challenge, IP blocking, login requirements, etc., consider adding such links to .lycheeignore file to bypass future checks.\n" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Used for links to be ignored during the link check. | ||
# Add link to file along with comment as to why it should be ignored | ||
|
||
#Example link in some of the tutorials that should be ignored | ||
file:///f:/libtmp/some_file | ||
|
||
#Ignore links with "file:///" to catch any other example links | ||
file:\/\/\/.* | ||
|
||
# Ignore colab link in the setting of conf.py | ||
https://pytorch.org/tutorials/beginner/colab/n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
document.addEventListener("DOMContentLoaded", function() { | ||
// Select all <li> elements with the class "toctree-l1" | ||
var toctreeItems = document.querySelectorAll('li.toctree-l1'); | ||
|
||
toctreeItems.forEach(function(item) { | ||
// Find the link within the item | ||
var link = item.querySelector('a'); | ||
var nestedList = item.querySelector('ul'); | ||
|
||
if (link && nestedList) { | ||
// Create a span element for the "[+]" or "[-]" sign | ||
var expandSign = document.createElement('span'); | ||
expandSign.style.cursor = 'pointer'; // Make it look clickable | ||
|
||
// Use the link text as a unique key for localStorage | ||
var sectionKey = 'section_' + link.textContent.trim().replace(/\s+/g, '_'); | ||
|
||
// Retrieve the saved state from localStorage | ||
var isExpanded = localStorage.getItem(sectionKey); | ||
|
||
// If no state is saved, default to expanded for "Learn the Basics" and collapsed for others | ||
if (isExpanded === null) { | ||
isExpanded = (link.textContent.trim() === 'Learn the Basics') ? 'true' : 'false'; | ||
localStorage.setItem(sectionKey, isExpanded); | ||
} | ||
|
||
if (isExpanded === 'true') { | ||
nestedList.style.display = 'block'; // Expand the section | ||
expandSign.textContent = '[-] '; // Show "[-]" since it's expanded | ||
} else { | ||
nestedList.style.display = 'none'; // Collapse the section | ||
expandSign.textContent = '[+] '; // Show "[+]" since it's collapsed | ||
} | ||
|
||
// Add a click event to toggle the nested list | ||
expandSign.addEventListener('click', function() { | ||
if (nestedList.style.display === 'none') { | ||
nestedList.style.display = 'block'; | ||
expandSign.textContent = '[-] '; // Change to "[-]" when expanded | ||
localStorage.setItem(sectionKey, 'true'); // Save state | ||
} else { | ||
nestedList.style.display = 'none'; | ||
expandSign.textContent = '[+] '; // Change back to "[+]" when collapsed | ||
localStorage.setItem(sectionKey, 'false'); // Save state | ||
} | ||
}); | ||
|
||
// Insert the sign before the link | ||
link.parentNode.insertBefore(expandSign, link); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Training Transformer models using Distributed Data Parallel and Pipeline Parallelism | ||
==================================================================================== | ||
|
||
This tutorial has been deprecated. | ||
|
||
Redirecting to the latest parallelism APIs in 3 seconds... | ||
|
||
.. raw:: html | ||
|
||
<meta http-equiv="Refresh" content="3; url='https://pytorch.org/tutorials/beginner/dist_overview.html#parallelism-apis'" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
**Authors:** James Reed ([email protected]), Michael Suo ([email protected]), rev2 | ||
.. note:: TorchScript is no longer in active development. | ||
This tutorial is an introduction to TorchScript, an intermediate | ||
representation of a PyTorch model (subclass of ``nn.Module``) that | ||
can then be run in a high-performance environment such as C++. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.