Harmonize HF environment variables + other cleaning (#27564)

* Harmonize HF environment variables + other cleaning

* backward compat

* switch from HUGGINGFACE_HUB_CACHE to HF_HUB_CACHE

* revert
This commit is contained in:
Lucain
2023-11-21 18:36:26 +01:00
committed by GitHub
parent 7f04373865
commit d2a980ec74
2 changed files with 61 additions and 99 deletions

View File

@@ -25,6 +25,8 @@ import warnings
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from huggingface_hub import try_to_load_from_cache
from .utils import (
HF_MODULES_CACHE,
TRANSFORMERS_DYNAMIC_MODULE_NAME,
@@ -32,7 +34,6 @@ from .utils import (
extract_commit_hash,
is_offline_mode,
logging,
try_to_load_from_cache,
)