mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-07-07 13:44:23 +08:00
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>
This commit is contained in:
parent
4767902000
commit
6baa3bdde6
@ -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…
x
Reference in New Issue
Block a user