Pin PNNX to avoid PNNX==20240410 bug (#9953)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
new-cache^2
Glenn Jocher 8 months ago committed by GitHub
parent 417c429ec4
commit ea03db9984
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/ci.yaml
  2. 16
      ultralytics/engine/exporter.py

@ -123,7 +123,7 @@ jobs:
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov8s-worldv2.pt' imgsz=160 verbose=0.318 run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov8s-worldv2.pt' imgsz=160 verbose=0.318
- name: Benchmark SegmentationModel - name: Benchmark SegmentationModel
shell: bash shell: bash
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-seg.pt' imgsz=160 verbose=0.281 run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-seg.pt' imgsz=160 verbose=0.280
- name: Benchmark ClassificationModel - name: Benchmark ClassificationModel
shell: bash shell: bash
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-cls.pt' imgsz=160 verbose=0.166 run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-cls.pt' imgsz=160 verbose=0.166

@ -529,12 +529,16 @@ class Exporter:
f"or in {ROOT}. See PNNX repo for full installation instructions." f"or in {ROOT}. See PNNX repo for full installation instructions."
) )
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:
_, assets = get_github_assets(repo="pnnx/pnnx", retry=True) # PNNX link fixed at 20240226 due to bug in 20240410
url = [x for x in assets if f"{system}.zip" in x][0] # try:
except Exception as e: # _, assets = get_github_assets(repo="pnnx/pnnx", retry=True)
url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip" # url = [x for x in assets if f"{system}.zip" in x][0]
LOGGER.warning(f"{prefix} WARNING ⚠ PNNX GitHub assets not found: {e}, using default {url}") # except Exception as e:
# url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip"
# LOGGER.warning(f"{prefix} WARNING ⚠ PNNX GitHub assets not found: {e}, using default {url}")
url = f"https://github.com/pnnx/pnnx/releases/download/20240226/pnnx-20240226-{system}.zip"
asset = attempt_download_asset(url, repo="pnnx/pnnx", release="latest") asset = attempt_download_asset(url, repo="pnnx/pnnx", release="latest")
if check_is_path_safe(Path.cwd(), asset): # avoid path traversal security vulnerability if check_is_path_safe(Path.cwd(), asset): # avoid path traversal security vulnerability
unzip_dir = Path(asset).with_suffix("") unzip_dir = Path(asset).with_suffix("")

Loading…
Cancel
Save