MCPcopy Create free account
hub / github.com/cosdata/cosdata / generate_vectors

Function generate_vectors

tests/load-test.py:310–318  ·  view source on GitHub ↗
(
    txn_count, batch_count, batch_size, dimensions, perturbation_degree
)

Source from the content-addressed store, hash-verified

308
309
310def generate_vectors(
311 txn_count, batch_count, batch_size, dimensions, perturbation_degree
312):
313 vectors = [
314 generate_random_vector_with_id(id, dimensions)
315 for id in range(txn_count * batch_count * batch_size)
316 ]
317 np.random.shuffle(vectors)
318 return vectors
319
320
321def search(vectors, vector_db_name, query):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected