|
|
@@ -25,6 +25,10 @@ public class RegionRecallScorerV1AllRov extends AbstractScorer4Recall {
|
|
|
@Override
|
|
|
public List<Pair<Long, Double>> recall(Map<String, String> params) {
|
|
|
Model4RecallKeyValue model = (Model4RecallKeyValue) this.getModel();
|
|
|
+ if (model == null || model.kv == null) {
|
|
|
+ // OSS 文件 (alg_recall_file/01_recall_region1hour_all_rov.txt) 还没建好时 ModelManager 拉取失败, 软退化返回空
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
String key = params.getOrDefault("region_province", "中国");
|
|
|
List<Pair<Long, Double>> lists = model.kv.getOrDefault(key, new ArrayList<>());
|
|
|
if (lists.isEmpty()) {
|