From 35cacaa5bafff1eee5359eeb0bb3fc9218680f1d Mon Sep 17 00:00:00 2001 From: Yingge He Date: Tue, 27 Jan 2026 17:38:09 -0800 Subject: [PATCH 1/5] Update model tag --- qa/python_models/torchvision/resnet50/model.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/python_models/torchvision/resnet50/model.py b/qa/python_models/torchvision/resnet50/model.py index 6a31a77420..eb71af1ec9 100644 --- a/qa/python_models/torchvision/resnet50/model.py +++ b/qa/python_models/torchvision/resnet50/model.py @@ -1,4 +1,4 @@ -# Copyright 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -37,12 +37,12 @@ def initialize(self, args): self.device = "cuda" if args["model_instance_kind"] == "GPU" else "cpu" # Avoid the "HTTP Error 403: rate limit exceeded" error torch.hub._validate_not_a_forked_repo = lambda a, b, c: True - # Our tests currently depend on torchvision=0.14, + # Our tests currently depend on torchvision=0.18, # to make sure `torch.hub` loads Resnet50 implementation - # compatible with torchvision=0.14, we need to provide tag + # compatible with torchvision=0.18, we need to provide tag self.model = ( torch.hub.load( - "pytorch/vision:v0.14.1", "resnet50", weights="IMAGENET1K_V2" + "pytorch/vision:v0.18.1", "resnet50", weights="IMAGENET1K_V2" ) .to(self.device) .eval() From 24a5cf0b5ec3c266e14ffee2374d74569539c2ec Mon Sep 17 00:00:00 2001 From: Yingge He Date: Tue, 27 Jan 2026 20:29:37 -0800 Subject: [PATCH 2/5] Update model version --- qa/python_models/torchvision/resnet50/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qa/python_models/torchvision/resnet50/model.py b/qa/python_models/torchvision/resnet50/model.py index eb71af1ec9..38351c0f93 100644 --- a/qa/python_models/torchvision/resnet50/model.py +++ b/qa/python_models/torchvision/resnet50/model.py @@ -37,12 +37,12 @@ def initialize(self, args): self.device = "cuda" if args["model_instance_kind"] == "GPU" else "cpu" # Avoid the "HTTP Error 403: rate limit exceeded" error torch.hub._validate_not_a_forked_repo = lambda a, b, c: True - # Our tests currently depend on torchvision=0.18, + # Our tests currently depend on torchvision=0.17, # to make sure `torch.hub` loads Resnet50 implementation - # compatible with torchvision=0.18, we need to provide tag + # compatible with torchvision=0.17, we need to provide tag self.model = ( torch.hub.load( - "pytorch/vision:v0.18.1", "resnet50", weights="IMAGENET1K_V2" + "pytorch/vision:v0.17.1", "resnet50", weights="IMAGENET1K_V2" ) .to(self.device) .eval() From d70ca12822ca41e3a9f0895d29717b25e51e281c Mon Sep 17 00:00:00 2001 From: Yingge He Date: Wed, 28 Jan 2026 16:41:16 -0800 Subject: [PATCH 3/5] afs --- qa/python_models/torchvision/resnet50/model.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qa/python_models/torchvision/resnet50/model.py b/qa/python_models/torchvision/resnet50/model.py index 38351c0f93..b463904c29 100644 --- a/qa/python_models/torchvision/resnet50/model.py +++ b/qa/python_models/torchvision/resnet50/model.py @@ -41,9 +41,7 @@ def initialize(self, args): # to make sure `torch.hub` loads Resnet50 implementation # compatible with torchvision=0.17, we need to provide tag self.model = ( - torch.hub.load( - "pytorch/vision:v0.17.1", "resnet50", weights="IMAGENET1K_V2" - ) + torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2") .to(self.device) .eval() ) From f944ebb246971a5b6dc6066110152490cff225cd Mon Sep 17 00:00:00 2001 From: Yingge He Date: Thu, 29 Jan 2026 10:34:35 -0800 Subject: [PATCH 4/5] afsafsf --- qa/python_models/torchvision/resnet50/model.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qa/python_models/torchvision/resnet50/model.py b/qa/python_models/torchvision/resnet50/model.py index b463904c29..46f83bcafd 100644 --- a/qa/python_models/torchvision/resnet50/model.py +++ b/qa/python_models/torchvision/resnet50/model.py @@ -25,6 +25,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import torch +import torchvision import triton_python_backend_utils as pb_utils from torch.utils.dlpack import to_dlpack @@ -35,13 +36,10 @@ def initialize(self, args): This function initializes pre-trained ResNet50 model. """ self.device = "cuda" if args["model_instance_kind"] == "GPU" else "cpu" - # Avoid the "HTTP Error 403: rate limit exceeded" error - torch.hub._validate_not_a_forked_repo = lambda a, b, c: True - # Our tests currently depend on torchvision=0.17, - # to make sure `torch.hub` loads Resnet50 implementation - # compatible with torchvision=0.17, we need to provide tag self.model = ( - torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2") + torchvision.models.resnet50( + weights=torchvision.models.ResNet50_Weights.DEFAULT + ) .to(self.device) .eval() ) From 7cb70afef5ff989db41ec29a2a158d5d03f2aa9d Mon Sep 17 00:00:00 2001 From: Yingge He Date: Fri, 30 Jan 2026 09:17:57 -0800 Subject: [PATCH 5/5] asfas --- qa/python_models/torchvision/resnet50/model.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qa/python_models/torchvision/resnet50/model.py b/qa/python_models/torchvision/resnet50/model.py index 46f83bcafd..0e6405d302 100644 --- a/qa/python_models/torchvision/resnet50/model.py +++ b/qa/python_models/torchvision/resnet50/model.py @@ -25,9 +25,9 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import torch -import torchvision import triton_python_backend_utils as pb_utils from torch.utils.dlpack import to_dlpack +from torchvision import models class TritonPythonModel: @@ -37,9 +37,7 @@ def initialize(self, args): """ self.device = "cuda" if args["model_instance_kind"] == "GPU" else "cpu" self.model = ( - torchvision.models.resnet50( - weights=torchvision.models.ResNet50_Weights.DEFAULT - ) + models.resnet50(weights=models.ResNet50_Weights.IMAGENET1K_V2) .to(self.device) .eval() )