When using tfrs.metrics.FactorizedTopK with a candidate dataset, passing a dataset of dictionaries (e.g., {"movie_title": ...}) causes a TypeError.
The error indicates that StringLookup expects a string tensor but receives a dictionary.
Expected behavior
-
The candidate dataset should be accepted even if it’s in dictionary form (common when using TFDS). The library should either:
-
Automatically extract the correct feature (e.g., "movie_title"), or
-
Provide clearer documentation/examples showing how to preprocess the dataset before passing to FactorizedTopK.
When using tfrs.metrics.FactorizedTopK with a candidate dataset, passing a dataset of dictionaries (e.g., {"movie_title": ...}) causes a TypeError.
The error indicates that StringLookup expects a string tensor but receives a dictionary.
Expected behavior
The candidate dataset should be accepted even if it’s in dictionary form (common when using TFDS). The library should either:
Automatically extract the correct feature (e.g., "movie_title"), or
Provide clearer documentation/examples showing how to preprocess the dataset before passing to FactorizedTopK.