tensorflow / tensorflow/recommenders

Retrieval Task Mixed Precision Dtype Issue

Open
#498 7 comments 5 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

For a mixed precision approach, I observed that the query_embeddings for the retrieval task gets cast to the global precision policy while the candidate_embedding preserves its dtype. It causes the linalg computation in the call method in retrieval to error due to different dtypes.
Screenshot 2022-06-05 022000

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 in the retrieval task's call method and reproduce the mixed-precision path described in the issue. Inspect the dtypes of query_embeddings and candidate_embedding before the linalg computation; done means the retrieval computation accepts them without a dtype mismatch error under mixed precision.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.