Skip to content

Commit af5178b

Browse files
committed
Merge branch 'consolidate_save_load_tutorials' of github.com:pytorch/tutorials into consolidate_save_load_tutorials
2 parents c5c074b + af630c5 commit af5178b

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

.github/workflows/link_checkPR.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,52 @@
11
#Checks links in a PR to ensure they are valid. If link is valid but failing, it can be added to the .lycheeignore file
2+
#Use the skip-link-check label on a PR to skip checking links on a PR
23

34
name: link check on PR
45

56
on:
67
pull_request:
78
branches: [main]
9+
810
jobs:
911
linkChecker:
1012
runs-on: ubuntu-latest
13+
1114
steps:
1215
- uses: actions/checkout@v4
1316
with:
1417
fetch-depth: 1
18+
1519
- name: Get Changed Files
1620
id: changed-files
1721
uses: tj-actions/changed-files@v41
22+
23+
- name: Check for Skip Label
24+
id: skip-label
25+
uses: actions/github-script@v6
26+
with:
27+
script: |
28+
const labels = await github.rest.issues.listLabelsOnIssue({
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
issue_number: context.issue.number
32+
});
33+
return labels.data.some(label => label.name === 'skip-link-check');
34+
1835
- name: Check Links
36+
if: steps.skip-label.outputs.result == 'false'
1937
uses: lycheeverse/lychee-action@v1
2038
with:
2139
args: --accept=200,403,429 --base . --verbose --no-progress ${{ steps.changed-files.outputs.all_changed_files }}
2240
token: ${{ secrets.CUSTOM_TOKEN }}
2341
fail: true
42+
43+
- name: Skip Message
44+
if: steps.skip-label.outputs.result == 'true'
45+
run: echo "Link check was skipped due to the presence of the 'skip-link-check' label."
46+
2447
- name: Suggestions
2548
if: failure()
2649
run: |
2750
echo -e "\nPlease review the links reported in the Check links step above."
28-
echo -e "If a link is valid but fails due to a CAPTCHA challenge, IP blocking, login requirements, etc.,
29-
consider adding such links to .lycheeignore file to bypass future checks.\n"
51+
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"
3052
exit 1

recipes_source/recipes/README.txt

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,22 @@ PyTorch Recipes
2525
Dynamic Quantization
2626
https://pytorch.org/tutorials/recipes/recipes/dynamic_quantization.html
2727

28-
7. save_load_across_devices.py
29-
Saving and loading models across devices in PyTorch
30-
https://pytorch.org/tutorials/recipes/recipes/save_load_across_devices.html
31-
32-
8. saving_and_loading_a_general_checkpoint.py
33-
Saving and loading a general checkpoint in PyTorch
34-
https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_a_general_checkpoint.html
35-
36-
9. saving_and_loading_models_for_inference.py
37-
Saving and loading models for inference in PyTorch
38-
https://pytorch.org/tutorials/recipes/recipes/saving_and_loading_models_for_inference.html
39-
40-
10. saving_multiple_models_in_one_file.py
41-
Saving and loading multiple models in one file using PyTorch
42-
https://pytorch.org/tutorials/recipes/recipes/saving_multiple_models_in_one_file.html
43-
44-
11. warmstarting_model_using_parameters_from_a_different_model.py
28+
7. warmstarting_model_using_parameters_from_a_different_model.py
4529
Warmstarting models using parameters from different model
4630
https://pytorch.org/tutorials/recipes/recipes/warmstarting_model_using_parameters_from_a_different_model.html
4731

48-
12. zeroing_out_gradients.py
32+
8. zeroing_out_gradients.py
4933
Zeroing out gradients
5034
https://pytorch.org/tutorials/recipes/recipes/zeroing_out_gradients.html
5135

52-
13. mobile_perf.py
36+
9. mobile_perf.py
5337
PyTorch Mobile Performance Recipes
5438
https://pytorch.org/tutorials/recipes/mobile_perf.html
5539

56-
14. amp_recipe.py
40+
10. amp_recipe.py
5741
Automatic Mixed Precision
5842
https://pytorch.org/tutorials/recipes/amp_recipe.html
5943

60-
15. regional_compilation.py
44+
11. regional_compilation.py
6145
Reducing torch.compile cold start compilation time with regional compilation
6246
https://pytorch.org/tutorials/recipes/regional_compilation.html

0 commit comments

Comments
 (0)