Commit d7be9c84 authored by Philippe Hamel's avatar Philippe Hamel Committed by Commit Bot

Nits for assist ranker.

Bug: 786472
Change-Id: I03a23cc70529ff2854ec538d6954411d6d89abdd
Reviewed-on: https://chromium-review.googlesource.com/830824
Commit-Queue: Philippe Hamel <hamelphi@chromium.org>
Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526722}
parent dc8a048f
...@@ -57,9 +57,8 @@ bool BasePredictor::IsReady() { ...@@ -57,9 +57,8 @@ bool BasePredictor::IsReady() {
void BasePredictor::LogFeatureToUkm(const std::string& feature_name, void BasePredictor::LogFeatureToUkm(const std::string& feature_name,
const Feature& feature, const Feature& feature,
ukm::UkmEntryBuilder* ukm_builder) { ukm::UkmEntryBuilder* ukm_builder) {
if (!ukm_builder) { if (!ukm_builder)
return; return;
}
if (!base::ContainsKey(*config_.feature_whitelist, feature_name)) { if (!base::ContainsKey(*config_.feature_whitelist, feature_name)) {
DVLOG(1) << "Feature not whitelisted: " << feature_name; DVLOG(1) << "Feature not whitelisted: " << feature_name;
......
...@@ -82,8 +82,8 @@ RankerModelStatus BinaryClassifierPredictor::ValidateModel( ...@@ -82,8 +82,8 @@ RankerModelStatus BinaryClassifierPredictor::ValidateModel(
bool BinaryClassifierPredictor::Initialize() { bool BinaryClassifierPredictor::Initialize() {
if (ranker_model_->proto().model_case() == if (ranker_model_->proto().model_case() ==
RankerModelProto::kLogisticRegression) { RankerModelProto::kLogisticRegression) {
inference_module_.reset(new GenericLogisticRegressionInference( inference_module_ = std::make_unique<GenericLogisticRegressionInference>(
ranker_model_->proto().logistic_regression())); ranker_model_->proto().logistic_regression());
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment