diff --git a/easy_rec/python/model/match_model.py b/easy_rec/python/model/match_model.py index 94e840813..294bb3dd4 100644 --- a/easy_rec/python/model/match_model.py +++ b/easy_rec/python/model/match_model.py @@ -231,7 +231,7 @@ def _build_list_wise_metric_graph(self, eval_config): label, logits[:, :batch_size], metric.recall_at_topk.topk) else: - ValueError('invalid metric type: %s' % str(metric)) + raise ValueError('invalid metric type: %s' % str(metric)) return metric_dict def _build_point_wise_metric_graph(self, eval_config): @@ -248,7 +248,7 @@ def _build_point_wise_metric_graph(self, eval_config): metric_dict['mean_absolute_error'] = metrics_tf.mean_absolute_error( tf.to_float(label), self._prediction_dict['y']) else: - ValueError('invalid metric type: %s' % str(metric)) + raise ValueError('invalid metric type: %s' % str(metric)) return metric_dict def get_outputs(self): diff --git a/samples/model_config/dssm_neg_sampler_need_key_feature.config b/samples/model_config/dssm_neg_sampler_need_key_feature.config index 12a8621cc..ea7cc8342 100644 --- a/samples/model_config/dssm_neg_sampler_need_key_feature.config +++ b/samples/model_config/dssm_neg_sampler_need_key_feature.config @@ -24,14 +24,14 @@ train_config { eval_config { metrics_set: { - auc { - } - } - metrics_set: { - gauc { - uid_field: "user_id" - } + recall_at_topk { topk: 3 } } + # currently not supported + # metrics_set: { + # gauc { + # uid_field: "user_id" + # } + # } } data_config { diff --git a/samples/model_config/dssm_neg_sampler_sequence_feature.config b/samples/model_config/dssm_neg_sampler_sequence_feature.config index df6896408..5ce0af37f 100644 --- a/samples/model_config/dssm_neg_sampler_sequence_feature.config +++ b/samples/model_config/dssm_neg_sampler_sequence_feature.config @@ -24,14 +24,14 @@ train_config { eval_config { metrics_set: { - auc { - } - } - metrics_set: { - gauc { - uid_field: "user_id" - } + recall_at_topk { topk: 3 } } + # currently not supported + # metrics_set: { + # gauc { + # uid_field: "user_id" + # } + # } } data_config {