Skip to content

Using savedir to actually store models (and not just simlinks) #1055

Description

@hbredin

The role of savedir option in

savedir="./pretrained_model_checkpoints",

confused me at first (I did not read the docstring carefully...)

What I thought it meant:

Pretrained models downloaded from Huggingface are stored into savedir.

What actually happens:

Pretrained models are downloaded into HUGGINGFACE_HUB_CACHE and simlinks are created into savedir.

Would you consider a PR that modifies those two lines to actually download models into savedir?

url = huggingface_hub.hf_hub_url(source, filename)
fetched_file = huggingface_hub.cached_download(url, use_auth_token)

using this cache_dir option: https://github.com/huggingface/huggingface_hub/blob/63fc9f81cd336ba1b8e88a35ce0be83b1199654a/src/huggingface_hub/file_download.py#L295

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions