Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source code Analysis #501

Open
1996srikesh opened this issue Aug 29, 2024 · 1 comment
Open

Source code Analysis #501

1996srikesh opened this issue Aug 29, 2024 · 1 comment

Comments

@1996srikesh
Copy link

1996srikesh commented Aug 29, 2024

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?

@massquantity
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants