From 1d84ba52870c86f77820664bd598060d1db6bb39 Mon Sep 17 00:00:00 2001 From: Datta Nimmaturi Date: Tue, 6 Jan 2026 15:30:06 +0530 Subject: [PATCH] Check env var explicitly Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- unsloth/models/_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index a2e1d78012..3cbb85ff4d 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1197,8 +1197,7 @@ def get_statistics(local_files_only = False): # You can disable this by setting UNSLOTH_DISABLE_STATISTICS import os - global USE_MODELSCOPE - if "UNSLOTH_DISABLE_STATISTICS" in os.environ or USE_MODELSCOPE: + if "UNSLOTH_DISABLE_STATISTICS" in os.environ or os.environ.get("UNSLOTH_USE_MODELSCOPE", "0") == "1": return if local_files_only: return