instancelib.instances.vectorstorage module
- class instancelib.instances.vectorstorage.VectorStorage(*args, **kwds)[source]
Bases:
MutableMapping[KT,VT],Generic[KT,VT,MT]- abstract get_vectors_chunked(keys, chunk_size=200)[source]
Return vectors in chunks of chunk_size containing the vectors requested in keys
- instancelib.instances.vectorstorage.ensure_writeable(func)[source]
A decorator that ensures that the wrapped method is only executed when the object is opened in writable mode
- Parameters:
func (F) – The method that should only be executed if the method
- Returns:
The same method with a check wrapped around it
- Return type:
F