Skip to content

Commit 52467d5

Browse files
authored
Fix the nightly link check: tell a broken runner from a dead link, repair every dead link it found (pytorch#21694)
1 parent 9cd0c12 commit 52467d5

11 files changed

Lines changed: 30 additions & 34 deletions

File tree

‎.ci/docker/common/install_openssl.sh‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
# NB: This script is needed for sccache and is adopted from PyTorch core repo at
9-
# https://github.com/pytorch/pytorch/blob/main/.ci/docker/common/install_openssl.sh
8+
# NB: This script is needed for sccache and is adopted from PyTorch core repo.
9+
# Core deleted its copy in pytorch/pytorch#179513, so this points at the last
10+
# revision that still had it instead of at a branch.
11+
# https://github.com/pytorch/pytorch/blob/9274b93eac9f026e9f51e282449b0300b8e05482/.ci/docker/common/install_openssl.sh
1012
set -ex
1113

1214
OPENSSL=openssl-1.1.1k

‎.ci/scripts/test_llava.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export_llava() {
114114
# Download a new image
115115
download_image() {
116116
echo "Downloading image"
117-
curl -o basketball.jpg https://upload.wikimedia.org/wikipedia/commons/7/73/Chicago_Bulls_and_New_Jersey_Nets%2C_March_28%2C_1991.jpg
117+
curl -fL -o basketball.jpg https://upload.wikimedia.org/wikipedia/commons/3/3e/Chicago_Bulls_-_New_Jersey_Nets_match_on_March_28%2C_1991.jpg
118118
}
119119

120120
run_and_verify() {

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div align="center">
88
<a href="https://pypi.org/project/executorch/"><img src="https://img.shields.io/pypi/v/executorch?style=for-the-badge&color=blue" alt="PyPI - Version"></a>
99
<a href="https://github.com/pytorch/executorch/graphs/contributors"><img src="https://img.shields.io/github/contributors/pytorch/executorch?style=for-the-badge&color=blue" alt="GitHub - Contributors"></a>
10-
<a href="https://github.com/pytorch/executorch/stargazers"><img src="https://img.shields.io/github/stars/pytorch/executorch?style=for-the-badge&color=blue" alt="GitHub - Stars"></a>
10+
<a href="https://github.com/pytorch/executorch/stargazers"><!-- @lint-ignore GitHub serves 404 on /stargazers to non-browser clients --><img src="https://img.shields.io/github/stars/pytorch/executorch?style=for-the-badge&color=blue" alt="GitHub - Stars"></a>
1111
<a href="https://discord.gg/Dh43CKSAdc"><img src="https://img.shields.io/badge/Discord-Join%20Us-blue?logo=discord&logoColor=white&style=for-the-badge" alt="Discord - Chat with Us"></a>
1212
<a href="https://docs.pytorch.org/executorch/main/index.html"><img src="https://img.shields.io/badge/Documentation-blue?logo=googledocs&logoColor=white&style=for-the-badge" alt="Documentation"></a>
1313
</div>

‎backends/arm/scripts/toolchain_utils.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ function musl_select_toolchain() {
7575
fi
7676

7777
if [[ "${ARCH}" == "x86_64" ]] ; then
78-
toolchain_url="https://musl.cc/aarch64-linux-musl-cross.tgz"
78+
# musl.cc serves this fine to developers but has never answered the link
79+
# check from a GitHub hosted runner.
80+
toolchain_url="https://musl.cc/aarch64-linux-musl-cross.tgz" # @lint-ignore
7981
toolchain_dir="aarch64-linux-musl-cross"
8082
toolchain_md5_checksum="a6bb806af217a91cf575e15163e8b12b"
8183
toolchain_archive="${toolchain_dir}.tgz"

‎backends/qualcomm/scripts/download_qnn_sdk.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _read_qnn_config() -> Dict[str, str]:
7575
QNN_VERSION = _QNN_CONFIG.get("QNN_VERSION", "2.37.0.250724")
7676
QNN_ZIP_URL = _QNN_CONFIG.get(
7777
"QNN_ZIP_URL",
78-
f"https://softwarecenter.qualcomm.com/api/download/software/sdks/"
78+
f"https://softwarecenter.qualcomm.com/api/download/software/sdks/" # @lint-ignore only half of a URL, the rest is on the next line
7979
f"Qualcomm_AI_Runtime_Community/All/{QNN_VERSION}/v{QNN_VERSION}.zip",
8080
)
8181

‎docs/source/kernel-library-custom-aten-kernel.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Unlike the YAML entry API, the C++ API only uses C++ macros `EXECUTORCH_LIBRARY`
207207

208208
Please refer to [Custom Ops Best Practices](#custom-ops-api-best-practices) on which API to use.
209209

210-
Similar to [`TORCH_LIBRARY`](https://pytorch.org/cppdocs/library.html#library_8h_1a0bd5fb09d25dfb58e750d712fc5afb84) in PyTorch, `EXECUTORCH_LIBRARY` takes the operator name and the C++ function name and register them into ExecuTorch runtime.
210+
Similar to [`TORCH_LIBRARY`](https://docs.pytorch.org/cppdocs/api/library/index.html) in PyTorch, `EXECUTORCH_LIBRARY` takes the operator name and the C++ function name and register them into ExecuTorch runtime.
211211

212212
#### Prepare custom kernel implementation
213213

‎docs/source/success-stories.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ PrivateMind delivers a fully private AI assistant using ExecuTorch's .pte format
6666

6767
NimbleEdge successfully integrated ExecuTorch with its open-source DeliteAI platform to enable agentic workflows orchestrated in Python on mobile devices. The extensible ExecuTorch ecosystem allowed implementation of on-device optimization techniques leveraging contextual sparsity. ExecuTorch significantly accelerated the release of "NimbleEdge AI" for iOS, enabling models like Qwen 2.5 with tool calling support and achieving up to 30% higher transactions per second.
6868

69-
[Visit →](https://nimbleedge.com) • [Blog →](https://www.nimbleedge.com/blog/meet-nimbleedge-ai-the-first-truly-private-on-device-assistant) • [iOS App →](https://apps.apple.com/in/app/nimbleedge-ai/id6746237456)
69+
[Visit →](https://nimbleedge.com) • [Blog →](https://www.nimbleedge.com/blog/meet-nimbleedge-ai-the-first-truly-private-on-device-assistant)
7070
:::
7171

7272
::::

‎examples/models/llama/runner/generation.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(
7474
self.use_kv_cache = use_kv_cache
7575
self.tokenizer = get_tokenizer(tokenizer_path, tokenizer_config_path)
7676
self.device = device
77-
# For some models like qwen, mismatch is acceptable: https://github.com/QwenLM/Qwen2.5/issues/466#issuecomment-2146759706
77+
# For some models like qwen, mismatch is acceptable: https://github.com/QwenLM/Qwen3/issues/466#issuecomment-2146759706
7878
if vocab_size != self.tokenizer.n_words:
7979
print(
8080
"Warning - given vocab_size in params is unequal to tokenizer vocab size."

‎scripts/lint_urls.sh‎

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ trap 'kill 0' SIGINT
1212
status=0
1313
green='\e[1;32m'; red='\e[1;31m'; cyan='\e[1;36m'; yellow='\e[1;33m'; reset='\e[0m'
1414
user_agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
15+
egress_probe_url="https://api.github.com"
1516
max_jobs=10
1617
pids=()
1718

@@ -26,28 +27,18 @@ while IFS=: read -r filepath url; do
2627
sleep 1
2728
code=$(curl -k -gsLm30 --retry 3 --retry-delay 3 --retry-connrefused -o /dev/null -w "%{http_code}" -r 0-0 -A "$user_agent" "$url") || code=000
2829
fi
29-
if [ "$code" -lt 200 ] || [ "$code" -ge 400 ]; then
30-
sleep 1
31-
request_id=$(curl -sS -G -H 'Accept: application/json' \
32-
--data-urlencode "host=$url" \
33-
--data-urlencode "max_nodes=1" \
34-
--data-urlencode "node=us3.node.check-host.net" \
35-
https://check-host.net/check-http \
36-
| jq -r .request_id) || request_id=""
37-
if [ -n "$request_id" ]; then
38-
sleep 5
39-
for _ in {1..5}; do
40-
new_code=$(curl -sS -H 'Accept: application/json' \
41-
"https://check-host.net/check-result/$request_id" \
42-
| jq -r -e '.[][0][3]') || new_code=000
43-
[[ "$new_code" =~ ^[0-9]+$ ]] || new_code=000
44-
if [ "$new_code" -ge 200 ] && [ "$new_code" -lt 400 ]; then
45-
code=$new_code
46-
break
47-
fi
48-
sleep 5
49-
done
30+
if [[ "$code" == "000" ]]; then
31+
# No HTTP response at all. Usually a dead host, but a runner with no egress
32+
# gets 000 for everything, and failing 2000 live links helps nobody. One
33+
# probe of a host the runner already depends on tells the two apart.
34+
probe=$(curl -k -gsLm10 -o /dev/null -w "%{http_code}" "$egress_probe_url") || probe=000
35+
if [[ "$probe" == "000" ]]; then
36+
printf "${yellow}WARN %s${reset} ${cyan}%s${reset} %s\n" "$code" "$url" "$filepath"
37+
exit 0
5038
fi
39+
# Egress works, so the host is either dead or slow. Give it one more try
40+
# with a longer timeout before failing it.
41+
code=$(curl -k -gsLm60 -o /dev/null -w "%{http_code}" -A "$user_agent" "$url") || code=000
5142
fi
5243
# Treat Cloudflare JS-challenge and rate-limit as success.
5344
if [[ "$code" == "403" || "$code" == "429" || "$code" == "503" ]]; then

‎setup.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
# Part of this code is from pybind11 cmake_example:
9-
# https://github.com/pybind/cmake_example/blob/master/setup.py so attach the
10-
# license below.
8+
# Part of this code is from pybind11 cmake_example, so attach the license below.
9+
# That project has since dropped setup.py, so this points at the last revision
10+
# that still had it instead of at a branch.
11+
# https://github.com/pybind/cmake_example/blob/7a94877f581a14de4de1a096fb053a55fc2a66bf/setup.py
1112

1213
# Copyright (c) 2016 The Pybind Development Team, All rights reserved.
1314
#

0 commit comments

Comments
 (0)