AccuracyCalculator: make clearer Exception message when `embeddings` are NaN

Author: KevinMusgraveCreated Dec 21, 2024Updated Dec 21, 2024

If embeddings are NaN, it raises an unclear exception:

ValueError: When ref_includes_query is True, the first len(query) elements of reference must be equal to query. Likewise, the first len(query_labels) elements of reference_labels must be equal to query_labels.

Source: KevinMusgrave/pytorch-metric-learning