Update storage.py
Browse files- storage.py +2 -8
storage.py
CHANGED
@@ -1,12 +1,6 @@
|
|
1 |
import File
|
2 |
|
3 |
class LocalFileStore:
|
4 |
-
def __init__(self, file_type,
|
5 |
-
self.
|
6 |
-
self.chunks_path = file_type(os.path.join(self.embeddings_path, f'{name}_chunks.msgpack'))
|
7 |
-
self.dense_path = NumpyFile(os.path.join(self.embeddings_path, f'{name}_dense.npz'))
|
8 |
-
self.sparse_path = SparseFile(os.path.join(self.embeddings_path, f'{name}_sparse.npz'))
|
9 |
-
|
10 |
-
if not os.path.exists(self.embeddings_path):
|
11 |
-
os.makedirs(self.embeddings_path)
|
12 |
|
|
|
1 |
import File
|
2 |
|
3 |
class LocalFileStore:
|
4 |
+
def __init__(self, file_type: File, path, name: str):
|
5 |
+
self.file_path = os.path.join(self.path, f'{name}_{file_type.get_file_name()}.{file_type.get_extension()}')
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|