Skip to content

Commit f9e5e22

Browse files
committed
User-agent on CI snapshot download
1 parent a27b909 commit f9e5e22

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,15 @@ def snapshot_download_w_retry(*args, **kwargs):
5858
"""
5959
with hf_offline_context(True):
6060
try:
61-
return snapshot_download(*args, **kwargs)
61+
return snapshot_download(
62+
*args, user_agent={"is_ci": "true", "axolotl": "ci"}, **kwargs
63+
)
6264
except LocalEntryNotFoundError:
6365
pass
6466
with hf_offline_context(False):
65-
return snapshot_download(*args, **kwargs)
67+
return snapshot_download(
68+
*args, user_agent={"is_ci": "true", "axolotl": "ci"}, **kwargs
69+
)
6670

6771

6872
@pytest.fixture(scope="session", autouse=True)

0 commit comments

Comments
 (0)