Fix default cache dir
Browse files- config.json +1 -1
- retrieval_cased.py +2 -2
config.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
"AutoConfig": "configuration_cased.CaSEDConfig",
|
8 |
"AutoModel": "modeling_cased.CaSEDModel"
|
9 |
},
|
10 |
-
"cache_dir":
|
11 |
"index_name": "cc12m",
|
12 |
"model_type": "cased",
|
13 |
"retrieval_num_results": 10,
|
|
|
7 |
"AutoConfig": "configuration_cased.CaSEDConfig",
|
8 |
"AutoModel": "modeling_cased.CaSEDModel"
|
9 |
},
|
10 |
+
"cache_dir": null,
|
11 |
"index_name": "cc12m",
|
12 |
"model_type": "cased",
|
13 |
"retrieval_num_results": 10,
|
retrieval_cased.py
CHANGED
@@ -18,7 +18,7 @@ RETRIEVAL_DATABASES_URLS = {
|
|
18 |
}
|
19 |
|
20 |
|
21 |
-
def download_retrieval_databases(cache_dir: str
|
22 |
"""Download data if needed.
|
23 |
|
24 |
Args:
|
@@ -94,7 +94,7 @@ class RetrievalDatabase:
|
|
94 |
cache_dir (str): Path to cache directory. Defaults to "~/.cache/cased".
|
95 |
"""
|
96 |
|
97 |
-
def __init__(self, database_name: str, cache_dir: str
|
98 |
assert database_name in RETRIEVAL_DATABASES_URLS.keys(), (
|
99 |
f"Database name should be one of "
|
100 |
f"{list(RETRIEVAL_DATABASES_URLS.keys())}, got {database_name}."
|
|
|
18 |
}
|
19 |
|
20 |
|
21 |
+
def download_retrieval_databases(cache_dir: str):
|
22 |
"""Download data if needed.
|
23 |
|
24 |
Args:
|
|
|
94 |
cache_dir (str): Path to cache directory. Defaults to "~/.cache/cased".
|
95 |
"""
|
96 |
|
97 |
+
def __init__(self, database_name: str, cache_dir: str):
|
98 |
assert database_name in RETRIEVAL_DATABASES_URLS.keys(), (
|
99 |
f"Database name should be one of "
|
100 |
f"{list(RETRIEVAL_DATABASES_URLS.keys())}, got {database_name}."
|