Improve PNNX assets check robustness (#10089)
This commit is contained in:
parent
c842825595
commit
03badaff57
1 changed files with 2 additions and 1 deletions
|
|
@ -530,8 +530,9 @@ class Exporter:
|
||||||
)
|
)
|
||||||
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux"
|
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux"
|
||||||
try:
|
try:
|
||||||
_, assets = get_github_assets(repo="pnnx/pnnx", retry=True)
|
_, assets = get_github_assets(repo="pnnx/pnnx")
|
||||||
url = [x for x in assets if f"{system}.zip" in x][0]
|
url = [x for x in assets if f"{system}.zip" in x][0]
|
||||||
|
assert url, "Unable to retrieve PNNX repo assets"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
url = f"https://github.com/pnnx/pnnx/releases/download/20240410/pnnx-20240410-{system}.zip"
|
url = f"https://github.com/pnnx/pnnx/releases/download/20240410/pnnx-20240410-{system}.zip"
|
||||||
LOGGER.warning(f"{prefix} WARNING ⚠️ PNNX GitHub assets not found: {e}, using default {url}")
|
LOGGER.warning(f"{prefix} WARNING ⚠️ PNNX GitHub assets not found: {e}, using default {url}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue