Optimization-AI / LibAUC

LibAUC: A Deep Learning Library for X-Risk Optimization
https://libauc.org/
MIT License
273 stars 37 forks source link

ImportError when loading metrics #52

Closed kingrc15 closed 3 months ago

kingrc15 commented 4 months ago

The following code throws an ImportError with libauc==1.3.1.

from libauc.metrics import auc_prc_score

ImportError: cannot import name 'ndcg_at_k' from partially initialized module 'libauc.metrics'

The same error is thrown when importing other metrics such as auc_roc_score.

However, if I import utils first, the error isn't thrown.

import libauc.utils
from libauc.metrics import auc_prc_score
optmai commented 3 months ago

It is an importing issue. We will soon fix it.