While I was running a few tests for the R binding, e.g., (R-package/tests/testthat/test_ranking.R), it fails because metric function ‘auc’ cannot be found. Later I’ve found out that it’s because src/metric/auc.{h,cc,cu} isn’t linked statically (my build system compile the C/C++ components into a .so), and thus its registration logic wasn’t run.
There are logic within src/metric/metric.cc that force static linking of other metric functions (e.g., elementwise_metric
), but ‘auc’ isn’t one of them.
I’m not familiar enough with the codebase to tell if this is a bug or intended behavior (why single out ‘auc’?).