recommenders icon indicating copy to clipboard operation
recommenders copied to clipboard

Fix Keras 3.x compatibility in FactorizedTopK layer

Open xei opened this issue 3 months ago • 3 comments

The add_weight() method call in Streaming.init used positional arguments which breaks with Keras 3.x. Changed to keyword argument to maintain compatibility with both Keras 2.x and 3.x versions.

Fixes users getting "Cannot convert ('c','o','u','n','t','e','r') to a shape" error when using TensorFlow 2.16+ with TFRS 0.7.3.

Fixes #712 Fixes #731 Fixes #748 Fixes #754 Fixes #759

xei avatar Sep 26 '25 03:09 xei

When can we expect this pull request to be completed? At the moment, the TensorFlow recommenders tutorials won't work with any FactorizedTopK metrics.

msburns24 avatar Nov 04 '25 14:11 msburns24

Hello, I fixed internally via https://github.com/tensorflow/recommenders/pull/765 (same PR as yours).

fahrbach avatar Nov 10 '25 20:11 fahrbach

#765 which merged should have this fixed. Sadly, there's no autoclose of this and duplicates.

mihaimaruseac avatar Nov 13 '25 16:11 mihaimaruseac