-
Notifications
You must be signed in to change notification settings - Fork 122
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
Improve progress bar new #440
Conversation
fastembed/common/model_management.py
Outdated
if not metadata: # happens when internet connection is down while downloading | ||
raise ValueError("No valid files found to save metadata") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this exception is not required, since it is an internal function and exception occurs due to another important problem which will be seen anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is actually required. If the network connection is down while downloading, then there will be no raise at all, and then we will get failed to load model
rather couldn't download model from any sources
.
The reason is, snapshot_download
returns string either succeeded or failed. Hence, I had to raise while saving to make sure everything downloaded successfully.
fastembed/common/model_management.py
Outdated
metadata_file = snapshot_dir / cls.METADATA_FILE | ||
|
||
try: | ||
# at least there's network first time (we should make sure to not fail if no network) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if I understand this comment, it looks like "at least there's network first time" is from the previous iteration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model_info
and list_repo_tree
are network calls to HF. So at least we would have network while downloading first time.
fix: Fix ci
* refactor * chore: Remove redundant enable progress bar --------- Co-authored-by: hh-space-invader <[email protected]>
2e07ced
to
3928f3f
Compare
All Submissions:
New Feature Submissions:
pre-commit
withpip3 install pre-commit
and set up hooks withpre-commit install
?New models submission: