LibRecommender icon indicating copy to clipboard operation
LibRecommender copied to clipboard

Source code Analysis

Open 1996srikesh opened this issue 1 year ago • 1 comments

Hi,

I am trying to understand the TwoTower implementation by walking through the source code, but I don't see where the build_model() function is being called. Also, I don't see self.serving_topk() being used anywhere either, only recommend_from_embedding and predict_from_embedding. Can this please be explained?

1996srikesh avatar Aug 29 '24 12:08 1996srikesh

Hi, The TwoTower class inherits from the DynEmbedBase class, which inherits from the EmbedBase class. The build_model method is called in the fit method of EmbedBase. self.serving_topk() is used in online serving. Specifically, it is used in the libserving module.

massquantity avatar Aug 30 '24 10:08 massquantity