Remove hf_xet warning

This commit is contained in:
Daniel Han 2025-05-02 04:23:53 -07:00
commit 439cae9fae
2 changed files with 7 additions and 3 deletions

View file

@ -60,9 +60,6 @@ os.environ["PYTORCH_CUDA_ALLOC_CONF"] = \
if "HF_HUB_ENABLE_HF_TRANSFER" not in os.environ:
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
pass
if "HF_XET_HIGH_PERFORMANCE" not in os.environ:
os.environ["HF_XET_HIGH_PERFORMANCE"] = "1"
pass
# Log Unsloth is being used
os.environ["UNSLOTH_IS_PRESENT"] = "1"

View file

@ -190,6 +190,13 @@ try:
except:
pass
# Xet Storage is enabled for this repo, but the 'hf_xet' package is not installed.
try:
from huggingface_hub.file_download import logger as hub_logger
hub_logger.addFilter(HideLoggingMessage("hf_xet"))
del hub_logger
except:
pass
# Patch get_model_param_count to record correct 4bit / 8bit
from transformers.trainer_pt_utils import is_deepspeed_zero3_enabled