We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python: malloc.c:4122: _int_malloc: Assertion `chunk_main_arena (fwd)' failed. Aborted (core dumped)
@server def get_user_profiles(query: str, top_k: int = 5): print(f"get_user_profiles: {query}") global user_profile_index # import pdb;pdb.set_trace() print(f"get_user_profiles: {query}") queries = [query] query_embeddings = model.encode(queries, normalize_embeddings=True) logger.info(f"query_embeddings: {query_embeddings}") results, search_time, corpus_index = semantic_search_usearch( query_embeddings, corpus_index=user_profile_index, corpus_embeddings=corpus_embeddings if user_profile_index is None else None, corpus_precision=corpus_precision, top_k=top_k, calibration_embeddings=full_corpus_embeddings, rescore=corpus_precision != "float32", rescore_multiplier=4, exact=True, output_index=True, ) # import pdb;pdb.set_trace() # print(f"query_embeddings: {query_embeddings}") del query_embeddings
for query, result in zip(queries, results): print(f"Query: {query}") user_profiles = [] for entry in result: score = entry['score'] corpus_id = entry['corpus_id'] # text = corpus[corpus_id] # print(f"(Score: {score:.4f}) {text}") logger.info(f"corpus_id: {corpus_id}") with duckdb.connect("duckdb.db") as con: df = con.sql(f"select * from user_profile offset {corpus_id} limit 1").df() logger.info(f"df: {df}") user_profile = df['user'].values[0] logger.info(f"user_profile: {user_profile}") user_profiles.append(user_profile) return user_profiles
return the same
v0.4.0
22.04
x86
Python bindings
No response
.git
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
python: malloc.c:4122: _int_malloc: Assertion `chunk_main_arena (fwd)' failed.
Aborted (core dumped)
Steps to reproduce
@server
def get_user_profiles(query: str, top_k: int = 5):
print(f"get_user_profiles: {query}")
global user_profile_index
# import pdb;pdb.set_trace()
print(f"get_user_profiles: {query}")
queries = [query]
query_embeddings = model.encode(queries, normalize_embeddings=True)
logger.info(f"query_embeddings: {query_embeddings}")
results, search_time, corpus_index = semantic_search_usearch(
query_embeddings,
corpus_index=user_profile_index,
corpus_embeddings=corpus_embeddings if user_profile_index is None else None,
corpus_precision=corpus_precision,
top_k=top_k,
calibration_embeddings=full_corpus_embeddings,
rescore=corpus_precision != "float32",
rescore_multiplier=4,
exact=True,
output_index=True,
)
# import pdb;pdb.set_trace()
# print(f"query_embeddings: {query_embeddings}")
del query_embeddings
Expected behavior
return the same
USearch version
v0.4.0
Operating System
22.04
Hardware architecture
x86
Which interface are you using?
Python bindings
Contact Details
No response
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: