Skip to content
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

Merged
merged 9 commits into from
Dec 19, 2024

Conversation

JingofXin
Copy link
Contributor

News:

Verify Multi-thread:

image


def __init__(self, call_back=None, token=None):
self._token = token if self._verify_hub_token(token) else None
self._call_back = call_back
Copy link
Contributor

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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HuggingfaceDownloader / ModelscopeDownloader 能不能在ModelManager创建的时候直接初始化,而不是每次调用函数时候初始化一个新的

@wzh1994 wzh1994 changed the title Unified Download Progress2 for Huggingface and Modelscope Unified Download Progress for Huggingface and Modelscope Dec 19, 2024
@wzh1994 wzh1994 merged commit 327b498 into LazyAGI:main Dec 19, 2024
14 checks passed
@mergify mergify bot added the lint_pass label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants