Improve progress bar new#440
Conversation
| 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.
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.
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.
| 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.
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.
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 <h.hagag.ali@gmail.com>
2e07ced to
3928f3f
Compare
All Submissions:
New Feature Submissions:
pre-commitwithpip3 install pre-commitand set up hooks withpre-commit install?New models submission: