Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conditionally convert model outputs containing session id for NDCG co…
…mputation (pytorch#1678) Summary: Pull Request resolved: pytorch#1678 This diff conditionally applies model output conversion only for session_id lists for models that use NDCG. This is done at the metric level such that model owners do not have to apply the change across various models and instead can rely on the metric library to handle it for them. RecMetrics will now conditionally convert list of session id strings to a tensor of session ids. The condition is based on 1) NDCG specified in the config and subsequently the session_key and 2) session id is a List of strings. Only then will it convert it to a tensor of session ids. By default session_key is "session_id", if the model has a different key for its session id list then it must be specified in the config. Reviewed By: howei Differential Revision: D53327408 fbshipit-source-id: ecad32a7f375c9f0f9fca176de63416f2cc6bd23
- Loading branch information