tensorflow / similarity

TensorFlow Similarity is a python package focused on making similarity learning quick and easy.
Apache License 2.0
1.01k stars 104 forks source link

bug when using 'auto' distance but no loss is supllied #323

Closed owenvallis closed 1 year ago

owenvallis commented 1 year ago

When passing an existing embedding to TF Sim, we don't call compile or pass a loss. This can lead to the situation where the indexer requires a distance string but fails to find one. 0.18 will remove the need for the distance string, but we need a patch for 0.17.

owenvallis commented 1 year ago

Spoke offline with @dnazila and we'll push a proper fix in 0.18 by making search and store Optional[Search] and Optional[Strore]. This will remove the strings from the params which removes the need to pass in the distance to the Indexer.

As an interim fix in 0.17 we will make the distance default to 'cosine' if no loss is provided.