You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Model download sleeps after its final failed attempt #855
ModelManagement.download_model() sleeps after the final failed download attempt, even when its retry counter has reached zero.
With the default retries=3, failed downloads sleep for 3, 9 and 27 seconds. Only the first two sleeps precede another attempt; the last 27 seconds delay the final ValueError without retrying anything. With retries=1, a failed attempt still sleeps for three seconds before returning the error.
Minimal reproduction
This reproducer mocks model downloads and sleep, so it needs no model weights or network access:
Sleep only when another attempt remains. Preserve the number of attempts, exponential delays between them, URL fallback, offline behavior and the final exception.
I reproduced this with four regression cases covering one/three attempts, with and without URL fallback. All four fail before the fix because of the extra sleep.
Environment
FastEmbed 0.9.1 from current main
Python 3.11.9 on macOS
Downloads and sleeps mocked; no model downloaded or credentials used
AI assistance: OpenAI Codex. The regression cases were run locally.
Activity