mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-07-08 22:54:54 +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
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
__version__ = '8.0.212'
|
__version__ = '8.0.213'
|
||||||
|
|
||||||
from ultralytics.models import RTDETR, SAM, YOLO
|
from ultralytics.models import RTDETR, SAM, YOLO
|
||||||
from ultralytics.models.fastsam import FastSAM
|
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>"""
|
"""Is model a Triton Server URL string, i.e. <scheme>://<netloc>/<endpoint>/<task_name>"""
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
url = urlsplit(model)
|
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
|
@staticmethod
|
||||||
def is_hub_model(model):
|
def is_hub_model(model):
|
||||||
|
@ -509,6 +509,6 @@ class AutoBackend(nn.Module):
|
|||||||
else:
|
else:
|
||||||
from urllib.parse import urlsplit
|
from urllib.parse import urlsplit
|
||||||
url = urlsplit(p)
|
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]
|
return types + [triton]
|
||||||
|
@ -439,7 +439,8 @@ def check_file(file, suffix='', download=True, hard=True):
|
|||||||
check_suffix(file, suffix) # optional
|
check_suffix(file, suffix) # optional
|
||||||
file = str(file).strip() # convert to string and strip spaces
|
file = str(file).strip() # convert to string and strip spaces
|
||||||
file = check_yolov5u_filename(file) # yolov5n -> yolov5nu
|
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
|
return file
|
||||||
elif download and file.lower().startswith(('https://', 'http://', 'rtsp://', 'rtmp://', 'tcp://')): # download
|
elif download and file.lower().startswith(('https://', 'http://', 'rtsp://', 'rtmp://', 'tcp://')): # download
|
||||||
url = file # warning: Pathlib turns :// -> :/
|
url = file # warning: Pathlib turns :// -> :/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user