Extract make metric name from ranking metric. (#8768)

- Extract the metric parsing routine from ranking.
- Add a test.
- Accept null for string view.
This commit is contained in:
Jiaming Yuan
2023-02-09 18:30:21 +08:00
committed by GitHub
parent 4ead65a28c
commit 5f76edd296
9 changed files with 142 additions and 34 deletions

View File

@@ -1,3 +1,6 @@
/**
* Copyright 2021 by XGBoost Contributors
*/
#include <gtest/gtest.h>
#include "../../../src/common/ranking_utils.cuh"
#include "../../../src/common/device_helpers.cuh"