Closed gabrielspmoreira closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@oliverholworthy hello. do you think you can review this PR? this is an important feature that'd be needed by users and us. thanks.
Goals :soccer:
batch_predict()
support only aDataset
as input. That prevents performingbatch_predict()
using aLoader
, which might contain transforms that are important to the modelRetrievalModelV2
, when among item features there are pre-trained embeddings loaded withEmbeddingOperator
transform.Loader
withtransforms
to allbatch_predict()
based methods (e.g.to_top_k_encoder()
.Implementation Details :construction:
batch_predict()
method and associated methods were changed to acceptLoader
besidesDataset
. When aLoader
is passed, it cascades any transforms (like theEmbeddingOperator
) to theLoader
that is created inside thedata_iterator_func
.Testing Details :mag:
test_two_tower_model_topk_evaluation_with_pretrained_emb
to ensure that it is possible to have pre-trained embeddings in the item tower and convert theretrieval_model.to_top_k_encoder()
.