`ultralytics 8.0.213` NVIDIA Triton gRPC fix (#6443)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/6398/head v8.0.213
Mert Can Demir 1 year ago committed by GitHub
parent 4767902000
commit 6baa3bdde6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ultralytics/__init__.py
  2. 2
      ultralytics/engine/model.py
  3. 2
      ultralytics/nn/autobackend.py
  4. 3
      ultralytics/utils/checks.py

@ -1,6 +1,6 @@
# Ultralytics YOLO 🚀, AGPL-3.0 license
__version__ = '8.0.212'
__version__ = '8.0.213'
from ultralytics.models import RTDETR, SAM, YOLO
from ultralytics.models.fastsam import FastSAM

@ -102,7 +102,7 @@ class Model(nn.Module):
"""Is model a Triton Server URL string, i.e. <scheme>://<netloc>/<endpoint>/<task_name>"""
from urllib.parse import urlsplit
url = urlsplit(model)
return url.netloc and url.path and url.scheme in {'http', 'grfc'}
return url.netloc and url.path and url.scheme in {'http', 'grpc'}
@staticmethod
def is_hub_model(model):

@ -509,6 +509,6 @@ class AutoBackend(nn.Module):
else:
from urllib.parse import urlsplit
url = urlsplit(p)
triton = url.netloc and url.path and url.scheme in {'http', 'grfc'}
triton = url.netloc and url.path and url.scheme in {'http', 'grpc'}
return types + [triton]

@ -439,7 +439,8 @@ def check_file(file, suffix='', download=True, hard=True):
check_suffix(file, suffix) # optional
file = str(file).strip() # convert to string and strip spaces
file = check_yolov5u_filename(file) # yolov5n -> yolov5nu
if not file or ('://' not in file and Path(file).exists()): # exists ('://' check required in Windows Python<3.10)
if (not file or ('://' not in file and Path(file).exists()) or # '://' check required in Windows Python<3.10
file.lower().startswith('grpc://')): # file exists or gRPC Triton images
return file
elif download and file.lower().startswith(('https://', 'http://', 'rtsp://', 'rtmp://', 'tcp://')): # download
url = file # warning: Pathlib turns :// -> :/

Loading…
Cancel
Save