Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] fix not support metric error not raised bug #452

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions easy_rec/python/model/match_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down
14 changes: 7 additions & 7 deletions samples/model_config/dssm_neg_sampler_need_key_feature.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions samples/model_config/dssm_neg_sampler_sequence_feature.config
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading