Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid the HTTP Error 403: rate limit exceeded error #7155

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qa/python_models/torchvision/resnet50/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# Copyright 2023-2024, 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
Expand Down Expand Up @@ -35,6 +35,8 @@ 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.14,
# to make sure `torch.hub` loads Resnet50 implementation
# compatible with torchvision=0.14, we need to provide tag
Expand Down
Loading