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

Update check_file() avoid repeat URL downloads #5526

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 5, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved file download logic with local file existence check.

πŸ“Š Key Changes

  • Added a check to see if a file already exists locally before attempting to download it from a URL.
  • If the file exists, it logs a message stating that the file was found locally.
  • If the file does not exist, it proceeds with the download and logs the download attempt.

🎯 Purpose & Impact

  • Reduce Unnecessary Downloads: Prevents unnecessary network traffic and reduces download time by using existing files.
  • Feedback to Users: Provides clear messages to users about whether a file was found locally or downloaded.
  • Ensure File Integrity: Maintains a check to ensure that after a file download, it exists and has content to prevent errors from an incomplete download.

@glenn-jocher glenn-jocher merged commit 32b8738 into master Nov 5, 2021
@glenn-jocher glenn-jocher deleted the update/check_file branch November 5, 2021 18:22
@glenn-jocher glenn-jocher self-assigned this Nov 5, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant