Space Gradio app unable to download public model

Space Link

Description

Hello HF team,

My Gradio space referenced in the link has been working fine for a few weeks. However this morning it started erroring with the message below without any code changes on my end that I can think of. The model it fails to download is public and has been working fine previously.

Could you please advise what I need to do to fix it:

Regards!

Successfully built validators ffmpy python-multipart
Installing collected packages: rfc3986, pydub, ffmpy, zipp, websockets, watchdog, uc-micro-py, tzdata, tornado, toolz, toml, sniffio, smmap, semver, python-multipart, pyrsistent, pyparsing, pympler, pygments, pydantic, pycryptodome, pkgutil-resolve-name, orjson, mdurl, markupsafe, kiwisolver, h11, fonttools, entrypoints, decorator, cycler, contourpy, cachetools, blinker, backports.zoneinfo, validators, uvicorn, pytz-deprecation-shim, matplotlib, markdown-it-py, linkify-it-py, jinja2, importlib-resources, importlib-metadata, gitdb, anyio, tzlocal, starlette, rich, pydeck, mdit-py-plugins, jsonschema, httpcore, gitpython, httpx, fastapi, altair, streamlit, gradio
Successfully installed altair-4.2.0 anyio-3.6.2 backports.zoneinfo-0.2.1 blinker-1.5 cachetools-5.2.1 contourpy-1.0.7 cycler-0.11.0 decorator-5.1.1 entrypoints-0.4 fastapi-0.89.1 ffmpy-0.3.0 fonttools-4.38.0 gitdb-4.0.10 gitpython-3.1.30 gradio-3.16.1 h11-0.14.0 httpcore-0.16.3 httpx-0.23.3 importlib-metadata-6.0.0 importlib-resources-5.10.2 jinja2-3.1.2 jsonschema-4.17.3 kiwisolver-1.4.4 linkify-it-py-1.0.3 markdown-it-py-2.1.0 markupsafe-2.1.2 matplotlib-3.6.3 mdit-py-plugins-0.3.3 mdurl-0.1.2 orjson-3.8.5 pkgutil-resolve-name-1.3.10 pycryptodome-3.16.0 pydantic-1.10.4 pydeck-0.8.0 pydub-0.25.1 pygments-2.14.0 pympler-1.0.1 pyparsing-3.0.9 pyrsistent-0.19.3 python-multipart-0.0.5 pytz-deprecation-shim-0.1.0.post0 rfc3986-1.5.0 rich-13.2.0 semver-2.13.0 smmap-5.0.0 sniffio-1.3.0 starlette-0.22.0 streamlit-1.17.0 toml-0.10.2 toolz-0.12.0 tornado-6.2 tzdata-2022.7 tzlocal-4.2 uc-micro-py-1.0.1 uvicorn-0.20.0 validators-0.20.0 watchdog-2.2.1 websockets-10.4 zipp-3.11.0
WARNING: You are using pip version 22.0.2; however, version 22.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
DONE 16.9s

--> COPY --link --chown=1000 --from=lfs /app /home/user/app
DONE 0.0s

--> COPY --link --chown=1000 ./ /home/user/app
DONE 0.1s

--> Pushing image
DONE 21.2s

--> Exporting cache
DONE 4.4s

===== Application Startup at 2023-01-21 17:56:28 =====

Loading model checkpoint: ivelin/donut-refexp-combined-v1
Traceback (most recent call last):
  File "app.py", line 12, in 
    processor = DonutProcessor.from_pretrained(pretrained_repo_name)
  File "/home/user/.local/lib/python3.8/site-packages/transformers/processing_utils.py", line 184, in from_pretrained
    args = cls._get_arguments_from_pretrained(pretrained_model_name_or_path, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/transformers/processing_utils.py", line 228, in _get_arguments_from_pretrained
    args.append(attribute_class.from_pretrained(pretrained_model_name_or_path, **kwargs))
  File "/home/user/.local/lib/python3.8/site-packages/transformers/models/auto/image_processing_auto.py", line 307, in from_pretrained
    config_dict, _ = ImageProcessingMixin.get_image_processor_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/transformers/image_processing_utils.py", line 257, in get_image_processor_dict
    resolved_image_processor_file = cached_file(
  File "/home/user/.local/lib/python3.8/site-packages/transformers/utils/hub.py", line 409, in cached_file
    resolved_file = hf_hub_download(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1150, in hf_hub_download
    with open(ref_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.cache/huggingface/hub/models--ivelin--donut-refexp-combined-v1/refs/main'

1 Like

hi @ivelin,

I’ve just duplicated and tested your Space, the caching error is not happening anymore, Could you please try to Factory reboot your Space?
We were experiencing infra outage, I’m not sure if this is related.

1 Like

Yes, it works fine again. Thank you for looking into it!

1 Like