Compare commits

...

1 Commits

Author SHA1 Message Date
Wing Lian
f9e5e22e6b User-agent on CI snapshot download 2025-05-20 08:52:33 -07:00

View File

@@ -58,11 +58,15 @@ def snapshot_download_w_retry(*args, **kwargs):
""" """
with hf_offline_context(True): with hf_offline_context(True):
try: try:
return snapshot_download(*args, **kwargs) return snapshot_download(
*args, user_agent={"is_ci": "true", "axolotl": "ci"}, **kwargs
)
except LocalEntryNotFoundError: except LocalEntryNotFoundError:
pass pass
with hf_offline_context(False): with hf_offline_context(False):
return snapshot_download(*args, **kwargs) return snapshot_download(
*args, user_agent={"is_ci": "true", "axolotl": "ci"}, **kwargs
)
@pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True)