Skip to content

Commit

Permalink
Improve PNNX assets check robustness (ultralytics#10089)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored and hmurari committed Apr 17, 2024
1 parent 0a6c8c2 commit de01132
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ultralytics/engine/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,9 @@ def export_ncnn(self, prefix=colorstr("NCNN:")):
)
system = "macos" if MACOS else "windows" if WINDOWS else "linux-aarch64" if ARM64 else "linux"
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]
assert url, "Unable to retrieve PNNX repo assets"
except Exception as e:
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}")
Expand Down

0 comments on commit de01132

Please sign in to comment.