Commit b6cd6ebc authored by tby's avatar tby Committed by Commit Bot

[Files ranking] VLOG group model weights.

For debugging, it will be useful to track the model weights over time
to rule out any bad behaviour in the model itself. This CL VLOGs the
weights each time they are changed.

Note the code for this looks a little misplaced at the bottom of
SearchResultRanker::Train, but that's where other metric-related code
lives in a parallel CL.

Bug: 1011221
Change-Id: I8a737b0f8221f7016d08c6f2f3f4e96d253ffd47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1864492Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Commit-Queue: Tony Yeoman <tby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706643}
parent 59ea3334
...@@ -506,6 +506,16 @@ void SearchResultRanker::Train(const AppLaunchData& app_launch_data) { ...@@ -506,6 +506,16 @@ void SearchResultRanker::Train(const AppLaunchData& app_launch_data) {
} else if (model == Model::APPS && app_ranker_) { } else if (model == Model::APPS && app_ranker_) {
app_ranker_->Record(NormalizeAppId(app_launch_data.id)); app_ranker_->Record(NormalizeAppId(app_launch_data.id));
} }
if (model == Model::MIXED_TYPES && app_launch_data.query.empty() &&
zero_state_group_ranker_) {
std::vector<std::string> weights;
for (const auto& pair : *zero_state_group_ranker_->GetTargetData())
weights.push_back(base::StrCat(
{pair.first, ":", base::NumberToString(pair.second.last_score)}));
VLOG(1) << "Zero state files model weights: ["
<< base::JoinString(weights, ", ") << "]";
}
} }
void SearchResultRanker::LogSearchResults( void SearchResultRanker::LogSearchResults(
......
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