Skip to content

ci: consolidate AI model downloads and add retry logic#59

Merged
Vladush merged 3 commits into
masterfrom
ci/cache-models-download
Jun 7, 2026
Merged

ci: consolidate AI model downloads and add retry logic#59
Vladush merged 3 commits into
masterfrom
ci/cache-models-download

Conversation

@Vladush

@Vladush Vladush commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Description

This PR addresses the frequent CI failures caused by unstable connections when downloading the YuNet and SFace .onnx models from GitHub and HuggingFace.
Instead of each build job downloading the models independently (5 parallel downloads), a new download-models job fetches the models once, and passes them to the build jobs via workflow artifacts.

In addition, scripts/download_models.sh has been upgraded to include a robust retry mechanism with exponential backoff (up to 3 attempts) and atomic file writes, which prevents partial/corrupted files from passing size checks.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Verified the retry logic and exponential backoff trigger correctly when simulating a network failure.
  • Verified that models are successfully skipped when already present.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Vladush Vladush merged commit 925178f into master Jun 7, 2026
10 checks passed
@Vladush Vladush deleted the ci/cache-models-download branch June 8, 2026 08:24
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.

1 participant