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

Loading a model creates warning; its annoying. #2890

Closed
tbachlechner opened this issue Aug 6, 2022 · 4 comments
Closed

Loading a model creates warning; its annoying. #2890

tbachlechner opened this issue Aug 6, 2022 · 4 comments

Comments

@tbachlechner
Copy link

tbachlechner commented Aug 6, 2022

In version flair == 0.11.3 and huggingface_hub == 0.8.1 loading a HuggingFace model creates a warning. To reproduce:

>>> from flair.models import MultiTagger
>>> models = ["flair/chunk-english"]
>>> MultiTagger.load(models)
/home/ubuntu/.local/lib/python3.9/site-packages/huggingface_hub/file_download.py:560: FutureWarning: `cached_download` is the legacy way to download files from the HF hub, please consider upgrading to `hf_hub_download`
  warnings.warn(
...

This is because flair.models.sequence_tagger_model caches models using from huggingface_hub import hf_hub_download, hf_hub_url. This is not recommended as of huggingface_hub == 0.8.1, see https://github.com/huggingface/huggingface_hub/releases. Warning is annoying.

@helpmefindaname
Copy link
Collaborator

Hi @tbachlechner, have you checked it that warning still comes on the main branch? afaik this is already fixed but not released

@tbachlechner
Copy link
Author

tbachlechner commented Aug 6, 2022

@helpmefindaname I see PR #2842 that was closed but not merged to master. What's the "main" branch? Is there a separate branch that goes to releases? I do see that PR is identical to mine :)

@helpmefindaname
Copy link
Collaborator

helpmefindaname commented Aug 6, 2022

sorry I meant the master branch.
the PR you mentioned was closed, because #2837 got merged.
can you try out the master and see if the problem still occurs?

@tbachlechner
Copy link
Author

oh yeah all good, master is identical to my PR :D sorry about that. can't wait for that release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants