Documentation ¶
Index ¶
- Constants
- func DefaultRetrieveFunc(c context.Context, r Retriever, searchClient searchv1.SearchClient, ...)
- type Calc
- type ColdStartRetriever
- type Query
- type RecallManager
- func (m *RecallManager) RelatedRec(c context.Context, request *recsys.RecsysRequest, ...) (response *recsys.RecsysResponse, err error)
- func (m *RecallManager) UpsRec(c context.Context, request *recsys.RecsysRequest, ...) (response *recsys.RecsysResponse, err error)
- func (m *RecallManager) V2RetrieveFunc(c context.Context, request *recsys.RecsysRequest, ...) (response *recsys.RecsysResponse, err error)
- type Retriever
- type Retriever2
- type RetrieverFunc
- type RetrieverFuncV2
- type RetrieverManager
- type Retrievers
- type Where
Constants ¶
View Source
const ( I2iRecall = "I2iRecall" I2Zone2iRecall = "I2Zone2iRecall" I2tag2iRecall = "I2tag2iRecall" )
召回策略
View Source
const ( SourceTagIDs = "SourceTagIDs" SourceZoneID = "SourceZoneID" SourceUpMID = "SourceUpMID" )
Source Video Info
View Source
const ( Hot = "hot" Selection = "selection" Relevant = "relevant" Tag = "tag" )
召回策略
View Source
const ( //recall class HotRecall = "HotRecall" RandomRecall = "RandomRecall" SelectionRecall = "SelectionRecall" UserProfileBili = "UserProfileBili" UserProfileBBQ = "UserProfileBBQ" LikeI2IRecall = "LikeI2IRecall" LikeTagRecall = "LikeTagRecall" LikeUPRecall = "LikeUPRecall" PosI2IRecall = "PosI2IRecall" PosTagRecall = "PosTagRecall" FollowRecall = "FollowRecall" )
召回策略
View Source
const ( RecallKeyI2IPrefix = "RECALL:I2I" RecallKeyTagIDPrefix = "RECALL:HOT_T" RecallKeyUpIDPrefix = "RECALL:HOT_UP" )
RecallKey Prefixes
View Source
const ( RecallOpVideoKey = "job:bbq:rec:op" RecallHotDefault = "RECALL:HOT_DEFAULT:0" )
Recall redis key
View Source
const BiliFollowsRecall = "BiliFollowsRecall"
Variables ¶
This section is empty.
Functions ¶
func DefaultRetrieveFunc ¶
func DefaultRetrieveFunc(c context.Context, r Retriever, searchClient searchv1.SearchClient, request rpc.RecsysRequest, userProfile *model.UserProfile, response chan rpc.RecsysResponse)
DefaultRetrieveFunc is default retrieve function
Types ¶
type Calc ¶
type Calc struct { Open int64 `json:"open"` PlayRatio float64 `json:"play_ratio"` FavRatio float64 `json:"fav_ratio"` LikeRatio float64 `json:"like_ratio"` PubRatio float64 `json:"pub_ratio"` CoinRatio float64 `json:"coin_ratio"` ReplyRatio float64 `json:"reply_ratio"` }
Calc .
type Query ¶
type Query struct { Calc *Calc `json:"calc"` Where *Where `json:"where"` Filter map[string]interface{} `json:"filter"` From int `json:"from"` Size int `json:"size"` }
Query .
type RecallManager ¶
type RecallManager struct {
Retrievers []Retriever2
}
RecallManager manages multiple retrieve functions
func (*RecallManager) RelatedRec ¶
func (m *RecallManager) RelatedRec(c context.Context, request *recsys.RecsysRequest, recallClient recallv1.RecsysRecallClient) (response *recsys.RecsysResponse, err error)
RelatedRec is retrieve function
func (*RecallManager) UpsRec ¶
func (m *RecallManager) UpsRec(c context.Context, request *recsys.RecsysRequest, userProfile *model.UserProfile, recallClient recallv1.RecsysRecallClient, relationClient api.RelationClient) (response *recsys.RecsysResponse, err error)
func (*RecallManager) V2RetrieveFunc ¶
func (m *RecallManager) V2RetrieveFunc(c context.Context, request *recsys.RecsysRequest, userProfile *model.UserProfile, recallClient recallv1.RecsysRecallClient) (response *recsys.RecsysResponse, err error)
V2RetrieveFunc is default retrieve function
type Retriever ¶
type Retriever interface {
// contains filtered or unexported methods
}
Retriever .
type Retriever2 ¶
type Retriever2 interface {
// contains filtered or unexported methods
}
Retriever2 ...
type RetrieverFunc ¶
type RetrieverFunc func(c context.Context, r Retriever, searchClient searchv1.SearchClient, request rpc.RecsysRequest, userProfile *model.UserProfile, response chan rpc.RecsysResponse)
RetrieverFunc ...
type RetrieverFuncV2 ¶
type RetrieverFuncV2 func(c context.Context, request *recsys.RecsysRequest, userProfile *model.UserProfile, recallClient recallv1.RecsysRecallClient) (response *recsys.RecsysResponse, err error)
RetrieverFuncV2 ...
type RetrieverManager ¶
type RetrieverManager struct { Retrievers []Retriever PreRetrievers []Retriever PostRetrievers []Retriever RetrieveFunc RetrieverFunc }
RetrieverManager manages multiple retrieve functions
func (*RetrieverManager) Merge ¶
func (m *RetrieverManager) Merge(response *rpc.RecsysResponse)
Merge ...
type Retrievers ¶
type Retrievers struct { MethodName string Retrieve RetrieverFunc }
Retrievers ...
Click to show internal directories.
Click to hide internal directories.