Versions in this module Expand all Collapse all v0 v0.4.6 Jun 16, 2022 Changes in this version + const LabelData + const LabelFeedbackType + const LabelStep + const PositiveFeedbackRate + const ServerNode + const TaskCacheGarbageCollection + const TaskFindItemNeighbors + const TaskFindUserNeighbors + const TaskFitClickModel + const TaskFitRankingModel + const TaskLoadDataset + const TaskSearchClickModel + const TaskSearchRankingModel + const WorkerNode + var ActiveItemsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var ActiveUsersTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CacheReclaimedTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CacheScannedSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CacheScannedTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringFitSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringNDCG10 = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringPrecision10 = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringRecall10 = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringSearchPrecision10 = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var CollaborativeFilteringSearchSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var FeedbacksTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var FindItemNeighborsSecondsVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var FindItemNeighborsTotalSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var FindUserNeighborsSecondsVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var FindUserNeighborsTotalSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var ImplicitFeedbacksTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var InactiveItemsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var InactiveUsersTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var ItemLabelsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var ItemNeighborIndexRecall = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var ItemsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var LoadDatasetStepSecondsVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var LoadDatasetTotalSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var MemoryInuseBytesVec = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var NegativeFeedbackTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var PositiveFeedbacksTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingAUC = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingFitSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingPrecision = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingRecall = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingSearchPrecision = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var RankingSearchSeconds = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UpdateItemNeighborsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UpdateUserNeighborsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UserLabelsTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UserNeighborIndexRecall = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + var UsersTotal = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + type DualDictionaryCentroidVector struct + func (d *DualDictionaryCentroidVector) Distance(vector search.Vector) float32 + type DualDictionaryVector struct + func NewDualDictionaryVector(indices1 []int32, values1 []float32, indices2 []int32, values2 []float32, ...) *DualDictionaryVector + func (v *DualDictionaryVector) Centroid(vectors []search.Vector, indices []int32) search.CentroidVector + func (v *DualDictionaryVector) Distance(vector search.Vector) float32 + func (v *DualDictionaryVector) IsHidden() bool + func (v *DualDictionaryVector) Terms() []string + type DualVectors struct + func NewDualVectors(first, second *Vectors) *DualVectors + func (v *DualVectors) Distance(i, j int) float32 + func (v *DualVectors) Neighbors(i int) []int32 + type Feedback struct + Comment string + FeedbackType string + Item data.Item + Timestamp time.Time + UserId string + type LocalCache struct + ClickModel click.FactorizationMachine + ClickModelScore click.Score + ClickModelVersion int64 + RankingModel ranking.MatrixFactorization + RankingModelName string + RankingModelScore ranking.Score + RankingModelVersion int64 + func LoadLocalCache(path string) (*LocalCache, error) + func (c *LocalCache) WriteLocalCache() error + type Master struct + func NewMaster(cfg *config.Config, cacheFile string) *Master + func (m *Master) AuthFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain) + func (m *Master) CreateWebService() + func (m *Master) GetClickModel(version *protocol.VersionInfo, sender protocol.Master_GetClickModelServer) error + func (m *Master) GetMeta(ctx context.Context, nodeInfo *protocol.NodeInfo) (*protocol.Meta, error) + func (m *Master) GetRankingModel(version *protocol.VersionInfo, sender protocol.Master_GetRankingModelServer) error + func (m *Master) LoadDataFromDatabase(database data.Database, posFeedbackTypes, readTypes []string, ...) (rankingDataset *ranking.DataSet, clickDataset *click.Dataset, ...) + func (m *Master) PushTaskInfo(_ context.Context, in *protocol.PushTaskInfoRequest) (*protocol.PushTaskInfoResponse, error) + func (m *Master) RunPrivilegedTasksLoop() + func (m *Master) RunRagtagTasksLoop() + func (m *Master) Serve() + func (m *Master) StartHttpServer() + type Node struct + BinaryVersion string + HttpPort int64 + IP string + Name string + Type string + func NewNode(ctx context.Context, nodeInfo *protocol.NodeInfo) *Node + type OnlineEvaluator struct + EvaluateDays int + PositiveFeedbacks map[string][]lo.Tuple3[int32, int32, time.Time] + ReadFeedbacks []map[int32]*i32set.Set + ReverseIndex map[lo.Tuple2[int32, int32]]time.Time + TruncatedDateToday time.Time + func NewOnlineEvaluator() *OnlineEvaluator + func (evaluator *OnlineEvaluator) Evaluate() []server.Measurement + func (evaluator *OnlineEvaluator) Positive(feedbackType string, userIndex, itemIndex int32, timestamp time.Time) + func (evaluator *OnlineEvaluator) Read(userIndex, itemIndex int32, timestamp time.Time) + type SinglePageAppFileSystem struct + func (fs *SinglePageAppFileSystem) Open(name string) (http.File, error) + type Status struct + BinaryVersion string + ItemNeighborIndexRecall float32 + LatestItemsUpdateTime time.Time + MatchingIndexRecall float32 + MatchingModelFitTime time.Time + MatchingModelScore ranking.Score + NumItemLabels int + NumItems int + NumServers int + NumTotalPosFeedback int + NumUserLabels int + NumUsers int + NumValidNegFeedback int + NumValidPosFeedback int + NumWorkers int + PopularItemsUpdateTime time.Time + RankingModelFitTime time.Time + RankingModelScore click.Score + UserNeighborIndexRecall float32 + type User struct + LastActiveTime time.Time + LastUpdateTime time.Time + type UserIterator struct + Cursor string + Users []User + type Vectors struct + func NewVectors(connections, connected [][]int32, weights []float32) *Vectors + func (v *Vectors) Distance(i, j int) float32 + func (v *Vectors) Neighbors(i int) []int32 + type VectorsInterface interface + Distance func(i, j int) float32 + Neighbors func(i int) []int32