File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ class EvalPrecision : public EvalRankWithCache<ltr::MAPCache> {
330
330
331
331
common::ParallelFor (p_cache->Groups (), ctx_->Threads (), [&](auto g) {
332
332
auto g_label = h_label.Slice (linalg::Range (gptr[g], gptr[g + 1 ]));
333
- auto g_rank = rank_idx.subspan (gptr[g]);
333
+ auto g_rank = rank_idx.subspan (gptr[g], gptr[g + 1 ] - gptr[g] );
334
334
335
335
auto n = std::min (static_cast <std::size_t >(param_.TopK ()), g_label.Size ());
336
336
double n_hits{0.0 };
@@ -438,7 +438,7 @@ class EvalMAPScore : public EvalRankWithCache<ltr::MAPCache> {
438
438
439
439
common::ParallelFor (p_cache->Groups (), ctx_->Threads (), [&](auto g) {
440
440
auto g_label = h_label.Slice (linalg::Range (gptr[g], gptr[g + 1 ]));
441
- auto g_rank = rank_idx.subspan (gptr[g]);
441
+ auto g_rank = rank_idx.subspan (gptr[g], gptr[g + 1 ] - gptr[g] );
442
442
443
443
auto n = std::min (static_cast <std::size_t >(param_.TopK ()), g_label.Size ());
444
444
double n_hits{0.0 };
You can’t perform that action at this time.
0 commit comments