mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-02 01:08:47 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
14 lines
464 B
Scala
14 lines
464 B
Scala
package com.twitter.ann.common
|
|
|
|
import com.twitter.stitch.Stitch
|
|
|
|
trait EmbeddingProducer[T] {
|
|
|
|
/**
|
|
* Produce an embedding from type T. Implementations of this could do a lookup from an id to an
|
|
* embedding. Or they could run a deep model on features that output and embedding.
|
|
* @return An embedding Stitch. See go/stitch for details on how to use the Stitch API.
|
|
*/
|
|
def produceEmbedding(input: T): Stitch[Option[EmbeddingType.EmbeddingVector]]
|
|
}
|