You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fingerprints = [tm.VectorFloat(b) for b in all_embeds]
lf.batch_add(fingerprints)
`
where all_embeds is a numpy array of molecular fingerprints in float.
I tried python3.6, 3.9, and 3.10, all installed with conda install -c tmap tmap,
running as python script throws a bunch of vectors and then quit, running in notebook dies immediately.
Any idea on how to fix this?
The text was updated successfully, but these errors were encountered:
Hi I found out that batch_add can only handle tm.VectorUint, hence I converted with
vectors = [tm.VectorFloat(embedding) for embedding in all_embeds[:100]]
# Initialize Minhash with desired dimensions
minhash = tm.Minhash(d=128)
# Create MinHash signatures from the embeddings
minhashes = minhash.batch_from_weight_array(vectors)
# Add the Fingerprints to the LSH Forest and index
lf.batch_add(minhashes)
Here's my code snippet:
`
perm = 128
lf = tm.LSHForest(perm)
fingerprints = [tm.VectorFloat(b) for b in all_embeds]
lf.batch_add(fingerprints)
`
where all_embeds is a numpy array of molecular fingerprints in float.
I tried python3.6, 3.9, and 3.10, all installed with
conda install -c tmap tmap
,running as python script throws a bunch of vectors and then quit, running in notebook dies immediately.
Any idea on how to fix this?
The text was updated successfully, but these errors were encountered: