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

from_pretrained_fastai does not download files #1961

Closed
pablogps opened this issue Jan 8, 2024 · 1 comment
Closed

from_pretrained_fastai does not download files #1961

pablogps opened this issue Jan 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pablogps
Copy link

pablogps commented Jan 8, 2024

Describe the bug

Trying to load a learner from Hugging Face does not get all or any files (the process stalls).

Reproduction

pip install huggingface_hub["fastai"]
from huggingface_hub import from_pretrained_fastai
learner = from_pretrained_fastai("espejelomar/identify-my-cat")

Results in

Fetching 4 files: 0% 0/4 [00:00<?, ?it/s]
model.pkl: 100% 87.5M/87.5M [00:02<00:00, 33.9MB/s]

(I sometimes get one file, sometimes none, but the first progress bar never moves from 0%.)

Logs

There's no error message (the cell never finishes execution).

System info

- huggingface_hub version: 0.20.1
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Running in iPython ?: Yes
- iPython shell: Shell
- Running in notebook ?: Yes
- Running in Google Colab ?: Yes
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: Pablogps
- Configured git credential helpers: store
- FastAI: 2.7.13
- Tensorflow: 2.15.0
- Torch: 2.1.0+cu121
- Jinja2: 3.1.2
- Graphviz: 0.20.1
- Pydot: 1.4.2
- Pillow: 9.4.0
- hf_transfer: N/A
- gradio: 4.13.0
- tensorboard: N/A
- numpy: 1.23.5
- pydantic: 2.5.3
- aiohttp: 3.9.1
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /root/.cache/huggingface/hub
- HF_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10

{'huggingface_hub version': '0.20.1',
 'Platform': 'Linux-6.1.58+-x86_64-with-glibc2.35',
 'Python version': '3.10.12',
 'Running in iPython ?': 'Yes',
 'iPython shell': 'Shell',
 'Running in notebook ?': 'Yes',
 'Running in Google Colab ?': 'Yes',
 'Token path ?': '/root/.cache/huggingface/token',
 'Has saved token ?': True,
 'Who am I ?': 'Pablogps',
 'Configured git credential helpers': 'store',
 'FastAI': '2.7.13',
 'Tensorflow': '2.15.0',
 'Torch': '2.1.0+cu121',
 'Jinja2': '3.1.2',
 'Graphviz': '0.20.1',
 'Pydot': '1.4.2',
 'Pillow': '9.4.0',
 'hf_transfer': 'N/A',
 'gradio': '4.13.0',
 'tensorboard': 'N/A',
 'numpy': '1.23.5',
 'pydantic': '2.5.3',
 'aiohttp': '3.9.1',
 'ENDPOINT': 'https://huggingface.co',
 'HF_HUB_CACHE': '/root/.cache/huggingface/hub',
 'HF_ASSETS_CACHE': '/root/.cache/huggingface/assets',
 'HF_TOKEN_PATH': '/root/.cache/huggingface/token',
 'HF_HUB_OFFLINE': False,
 'HF_HUB_DISABLE_TELEMETRY': False,
 'HF_HUB_DISABLE_PROGRESS_BARS': None,
 'HF_HUB_DISABLE_SYMLINKS_WARNING': False,
 'HF_HUB_DISABLE_EXPERIMENTAL_WARNING': False,
 'HF_HUB_DISABLE_IMPLICIT_TOKEN': False,
 'HF_HUB_ENABLE_HF_TRANSFER': False,
 'HF_HUB_ETAG_TIMEOUT': 10,
 'HF_HUB_DOWNLOAD_TIMEOUT': 10}
@pablogps pablogps added the bug Something isn't working label Jan 8, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Jan 8, 2024

Hi @pablogps, thanks for reporting. The issue doesn't come from from_pretrained_fastai but from a bug between huggingface_hub and google colab integration. A fix has been implemented in #1953 and released in huggingface_hub==0.20.2. However the default version in google colab is 0.20.1 (with the bug). The default version will soon be upgraded but in the meantime you can fix your problem by running !pip install -U huggingface_hub. More details in #1953 (comment).
I'm therefore closing this issue. Sorry for the inconvenience, hopefully solved very soon :)

@Wauplin Wauplin closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants