patcg-individual-drafts / topics

The Topics API
https://patcg-individual-drafts.github.io/topics/
Other
589 stars 168 forks source link

The Colab demo of the Topics classifier is incorrect and not aligned with Google Chrome's implementation of the Topics API #307

Closed yohhaan closed 1 week ago

yohhaan commented 3 months ago

Problem Description

The documentation of the Topics API for the web links to a demo on Google Colab to perform inferences with the model used by Chrome. However, this demo does not follow the same algorithm as the one executed in Google Chrome. As a result, classifications results differ.

Some differences in the Colab:

I would suggest updating the Colab demo to exactly mirror Google Chrome's implementation of the Topics API for the web. This would avoid potential confusion due to classification mismatches between the Colab and Chrome implementations.

Resources

jkarlin commented 1 week ago

Hi, thanks for creating the issue. The colab demo that you reference was meant as a one-time demonstration on how one might extract and use the classifier model and not as an evergreen document. We leave it as an exercise to developers to look at Chrome's code and to keep up with further changes if they want to copy Chrome's behavior over time.