Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided.
Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided.
Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.
A singleton SCollection containing the AnnoyUri of the saved files
Write the key-value pairs of this SCollection as an Annoy file to a specific location, building the trees in the index according to the parameters provided.
Write the key-value pairs of this SCollection as an Annoy file to a specific location, building the trees in the index according to the parameters provided.
Can be either a local file or a GCS location e.g. gs://<bucket>/<path>
One of Angular (cosine distance) or Euclidean
Number of dimensions in vectors
Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.
A singleton SCollection containing the AnnoyUri of the saved files
Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided, then load the trees as a side input.
Write the key-value pairs of this SCollection as an Annoy file to a temporary location, building the trees in the index according to the parameters provided, then load the trees as a side input.
One of Angular (cosine distance) or Euclidean
Number of dimensions in vectors
Number of trees to build. More trees means more precision & bigger indices. If nTrees is set to -1, the trees will automatically be built in such a way that they will take at most 2x the memory of the vectors.
SideInput[AnnoyReader]