mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-26 16:46:58 +00:00
Remove requests_cache in tests (#5285)
This commit is contained in:
parent
ad6072728d
commit
a1a390056a
@ -1,5 +1,4 @@
|
|||||||
import warnings
|
import warnings
|
||||||
from datetime import timedelta
|
|
||||||
from typing import Any, List, Optional, Dict, Union
|
from typing import Any, List, Optional, Dict, Union
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
@ -10,7 +9,6 @@ import re
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import requests_cache
|
|
||||||
import responses
|
import responses
|
||||||
import posthog
|
import posthog
|
||||||
|
|
||||||
@ -81,10 +79,6 @@ posthog.disabled = True
|
|||||||
# Disable caching from prompthub to avoid polluting the local environment.
|
# Disable caching from prompthub to avoid polluting the local environment.
|
||||||
os.environ["PROMPTHUB_CACHE_ENABLED"] = "false"
|
os.environ["PROMPTHUB_CACHE_ENABLED"] = "false"
|
||||||
|
|
||||||
# Cache requests (e.g. huggingface model) to circumvent load protection
|
|
||||||
# See https://requests-cache.readthedocs.io/en/stable/user_guide/filtering.html
|
|
||||||
requests_cache.install_cache(urls_expire_after={"huggingface.co": timedelta(hours=1), "*": requests_cache.DO_NOT_CACHE})
|
|
||||||
|
|
||||||
|
|
||||||
def fail_at_version(target_major, target_minor):
|
def fail_at_version(target_major, target_minor):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user