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

Ability to download older assets #7767

Merged
merged 4 commits into from
May 11, 2022

Conversation

CristiFati
Copy link
Contributor

@CristiFati CristiFati commented May 11, 2022

Sometimes, one would need to download the assets for a previously released version. Instead of doing it manually (either from browser, either changing the URL), it's possible to make use of attempt_download's newly added parameter (and a small change in data/scripts/download_weights.sh):

The release can be specified in 2 ways:

  • attempt_download(..., release='v5.0')

  • attempt_download(..., release='tags/v5.0')

Of course, current existing behavior is the default.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced attempt_download function to support specific GitHub release assets.

📊 Key Changes

  • attempt_download now accepts an additional release parameter to specify the GitHub release version.
  • Default behavior targets the latest release if no other is specified.
  • Constructed the URL to fetch from GitHub API now includes the specified release.
  • Added a check to prepend "tags/" to the release string if it is not the latest and does not already start with "tags/".

🎯 Purpose & Impact

  • Users can now download model weights or other assets from a specific release, providing greater control over the version of files used.
  • Enhances reproducibility and flexibility for developers and researchers who need specific versions of code or data.
  • Reduces potential issues from always pulling the latest version which might not be compatible with certain codebases or project requirements.

@glenn-jocher glenn-jocher merged commit 4870064 into ultralytics:master May 11, 2022
@glenn-jocher glenn-jocher changed the title Ability to dowlnoad older assets Ability to download older assets May 11, 2022
@glenn-jocher
Copy link
Member

@CristiFati PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐

@CristiFati CristiFati deleted the cfati_dev00 branch May 11, 2022 20:52
tdhooghe pushed a commit to tdhooghe/yolov5 that referenced this pull request Jun 10, 2022
* Ability to dowlnoad older assets

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

* Cleanup2

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Ability to dowlnoad older assets

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

* Cleanup2

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Ability to dowlnoad older assets

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

* Cleanup2

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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.

2 participants