tensorflow / tensorflow/recommenders

tfrs.metrics.FactorizedTopK with tensorflow_macos and tensorflow_metal

Open
#574 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

Metrics computed by FactorizedTopK seems very off when running on M1 Max.
Tried it on the "Quickstart" movielens example with Adam(0.005) and received the following evaluation results:

{'factorized_top_k/top_5_categorical_accuracy': 0.007550000213086605,
 'factorized_top_k/top_10_categorical_accuracy': 0.018650000914931297,
 'factorized_top_k/top_15_categorical_accuracy': 0.03215000033378601,
 'factorized_top_k/top_20_categorical_accuracy': 0.2814500033855438,
 'factorized_top_k/top_25_categorical_accuracy': 0.31675001978874207,
 'factorized_top_k/top_30_categorical_accuracy': 0.7000000476837158,
 'factorized_top_k/top_35_categorical_accuracy': 0.6884000301361084,
 'factorized_top_k/top_40_categorical_accuracy': 0.6511000394821167,
 'loss': 28395.984375,
 'regularization_loss': 0,
 'total_loss': 28395.984375}
tensorflow-macos==2.10.0
tensorflow-recommenders ==0.7.2
tensorflow-metal==0.6.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Quickstart MovieLens example and reproduce FactorizedTopK evaluation on an M1 Max using tensorflow-macos 2.10.0, tensorflow-recommenders 0.7.2, and tensorflow-metal 0.6.0. Compare the results with a supported non-metal TensorFlow environment and trace the metric computation. Done means the platform-specific discrepancy is explained and a regression test or documented limitation is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.