Hello! I encountered an issue when using the mean_average_precision_at_k function from the implicit library.
Problem Description:
When calling the mean_average_precision_at_k function, the following error occurs:
AttributeError: 'implicit.evaluation._memoryviewslice' object has no attribute 'dtype'
Context:
Operating System: Windows 10
Python: 3.10.7
implicit library version: 0.7.2
Installed dependencies:
[tool .poetry .dependencies ]
python = " ^3.10.7"
pandas = " ^2.2.2"
implicit = " ^0.7.2"
Steps to Reproduce:
Installed the implicit library version 0.7.2.
Called the mean_average_precision_at_k function with the following parameters:
metric_map = mean_average_precision_at_k (
model ,
csr_train ,
csr_test ,
K = 6 ,
show_progress = True ,
)
Encountered the above-mentioned error.
Expected Behavior:
The function should return the MAP@K metric value without errors.
Additional Information:
Tried reinstalling the library and its dependencies, but the error persists.
The code includes the following imports:
import numpy as np
import pandas as pd
from implicit .cpu .als import AlternatingLeastSquares as ALScpu
from implicit .evaluation import mean_average_precision_at_k
from scipy .sparse import coo_matrix
I would appreciate any assistance in resolving this issue.
👍 React with 👍 4fkurushin, gdragotto, kacparr and ehdrmfdl8 👀 React with 👀 2fkurushin and gdragotto