forked from IBM/text-generation-inference
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deprecate TRANSFORMERS_CACHE, use HF_HUB_CACHE everywhere (IBM#89)
#### Motivation `TRANSFORMERS_CACHE` is deprecated (slated for removal with Transformers v5) and `HUGGINGFACE_HUB_CACHE` is legacy. This PR standardizes on `HF_HUB_CACHE` to configure the cache. Also, not all operations/CLI commands were correctly pulling from `TRANSFORMERS_CACHE` so we have been setting both env vars anyways. After this change, everything should work with only `HF_HUB_CACHE`. #### Modifications - Launcher inspects HF_HUB_CACHE to determine the model cache path - TRANSFORMERS_CACHE and HUGGINGFACE_HUB_CACHE are still checked as well, but a deprecation warning is printed - if multiple values are present and do not match, raise an error - Launcher can resolve the default HF_HUB_CACHE so it does not need to be set (HF_HOME or its default can be used instead) - Server CLI checks TRANSFORMERS_CACHE and prints a warning if it is set - Server CLI returns an error if both TRANSFORMERS_CACHE and HF_HUB_CACHE are set with different values --------- Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com>
- Loading branch information
1 parent
ddc56ee
commit 2358566
Showing
6 changed files
with
115 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters