Skip to content

Issue with github api rate limiting #1890

@iceisfun

Description

@iceisfun

It seems that utils/google_utils.py has an issue in attempt_download after updating to the latest v4 stuff.

os.path.isfile is checked after calls to github, this ends up causing exceptions when a cluster of machines start making this api call and end up with rate limiting exceptions.

this function probably just needs to check if weights exists before making the api call.

# Don't download if we already have this file
if os.path.isfile(weights):
    return

before

response = requests.get('https://api.github.com/repos/ultralytics/yolov5/releases/latest').json()  # github api

Keep up the good work on yolov5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions