recommenders-team / recommenders

Best Practices on Recommendation Systems
https://recommenders-team.github.io/recommenders/intro.html
MIT License
18.81k stars 3.07k forks source link

Changing Function Name to reflect new Tensorflow interface. #2143

Closed siyerp closed 4 weeks ago

siyerp commented 1 month ago

Changed a function call name to reflect a more recent version of tensorflow.

Description

I changed .reset_states() to .reset_state().
I was getting an error along the lines of "'Mean' object has no attribute 'reset_states'." It seems that in a newer version of tensorflow, the function has been renamed to .reset_state.

Related Issues

References

Checklist:

miguelgfierro commented 1 month ago

@siyerp thanks for this.

Can you share what TF version are you using?

FYI @daviddavo

daviddavo commented 1 month ago

It doesn't appear in the changelog, but they changed it in 2.5.

I ran the tests on my machine and they work

siyerp commented 1 month ago

@miguelgfierro I'm using Tensorflow 2.16, but even in the example notebook it says it's using Tensorflow 2.8, and according to to @daviddavo 's comment, even that should have had this issue.

miguelgfierro commented 4 weeks ago

Merging this.

Please @siyerp notice that https://github.com/recommenders-team/recommenders/issues/2111 is in the works. If you want to collaborate on this effort, please let me know