User-agent on CI snapshot download
This commit is contained in:
@@ -58,11 +58,15 @@ def snapshot_download_w_retry(*args, **kwargs):
|
||||
"""
|
||||
with hf_offline_context(True):
|
||||
try:
|
||||
return snapshot_download(*args, **kwargs)
|
||||
return snapshot_download(
|
||||
*args, user_agent={"is_ci": "true", "axolotl": "ci"}, **kwargs
|
||||
)
|
||||
except LocalEntryNotFoundError:
|
||||
pass
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user