-
Notifications
You must be signed in to change notification settings - Fork 83
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
Unified Download Progress for Huggingface and Modelscope #394
Conversation
|
||
def __init__(self, call_back=None, token=None): | ||
self._token = token if self._verify_hub_token(token) else None | ||
self._call_back = call_back |
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.
callback不放到self,而是在def download(self, model_id, model_dir)
中传入,并通过参数传给_polling_progress
return model_save_dir if model_save_dir else model | ||
def validate_token(self): | ||
if self.model_source == 'huggingface': | ||
return HuggingfaceDownloader(token=self.token).verify_hub_token() |
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.
HuggingfaceDownloader / ModelscopeDownloader 能不能在ModelManager创建的时候直接初始化,而不是每次调用函数时候初始化一个新的
News:
tqdm
is abolished: Unified download progress for huggingface and modelscope #390validate_token
validate_model_id
Verify Multi-thread: