Skip to content

Commit

Permalink
Fix rename utils.google_utils to utils.downloads (ultralytics#4393)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Aug 11, 2021
1 parent a10e500 commit 500fe62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/scripts/download_weights.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# └── ...

python - <<EOF
from utils.google_utils import attempt_download
from utils.downloads import attempt_download
for x in ['s', 'm', 'l', 'x']:
attempt_download(f'yolov5{x}.pt')
Expand Down
4 changes: 2 additions & 2 deletions utils/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''):
print('')


def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_utils import *; attempt_download()
def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads import *; attempt_download()
# Attempt file download if does not exist
file = Path(str(file).strip().replace("'", ''))

Expand Down Expand Up @@ -74,7 +74,7 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_util


def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'):
# Downloads a file from Google Drive. from yolov5.utils.google_utils import *; gdrive_download()
# Downloads a file from Google Drive. from yolov5.utils.downloads import *; gdrive_download()
t = time.time()
file = Path(file)
cookie = Path('cookie') # gdrive cookie
Expand Down

0 comments on commit 500fe62

Please sign in to comment.