MCPcopy Create free account
hub / github.com/alibaba/zvec / open

Function open

python/zvec/zvec.py:227–246  ·  view source on GitHub ↗

Open an existing collection from disk. The collection must have been previously created with ``create_and_open``. Args: path (str): Path or name of the existing collection. option (CollectionOption): Configuration options for opening the collection. Defaults to

(path: str, option: CollectionOption = CollectionOption())

Source from the content-addressed store, hash-verified

225
226
227def open(path: str, option: CollectionOption = CollectionOption()) -> Collection:
228 """Open an existing collection from disk.
229
230 The collection must have been previously created with ``create_and_open``.
231
232 Args:
233 path (str): Path or name of the existing collection.
234 option (CollectionOption): Configuration options
235 for opening the collection. Defaults to a default-constructed
236 ``CollectionOption()`` if not provided.
237
238 Returns:
239 Collection: An opened collection instance.
240
241 Examples:
242 >>> import zvec
243 >>> coll = zvec.open("./my_collection")
244 """
245 _collection = _Collection.Open(path, option)
246 return Collection._from_core(_collection)

Callers 7

openMethod · 0.85
OpenSafelyFunction · 0.85
VecBufferPoolMethod · 0.85
openMethod · 0.85
TEST_FFunction · 0.85
openMethod · 0.85
TEST_FFunction · 0.85

Calls 2

OpenMethod · 0.45
_from_coreMethod · 0.45

Tested by 3

TEST_FFunction · 0.68
openMethod · 0.68
TEST_FFunction · 0.68