Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2726203002: [Translate] Add translate ranker model loader (take 2). (Closed)

Created:
3 years, 9 months ago by hamelphi
Modified:
3 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, pkl (ping after 24h if needed), Eugene But (OOO till 7-30), net-reviews_chromium.org, noyau+watch_chromium.org, asvitkine+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org, Roger McFarlane (Chromium), charliea (OOO until 10-5)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Translate] Add translate ranker model loader. This is a revert of a revert. It was originally https://codereview.chromium.org/2565873002 which was reverted in https://codereview.chromium.org/2726043003. Load the TranslateRanker model only if Query is enabled. This should fix the negative speed regression when Query is not enabled. This condition is controlled through Finch, and is currently only enabled in Canary and Dev. This will allow us to better investigate the speed regression using experimental/control groups. Also fix the Query/Enforcement logic so that enabling Enforcement automatically enforce Query. Revert "Revert "[translate] Add translate ranker model loader."" This reverts commit 9ea997e1d7bbd4350d8793e1629f33c98d00ce2b. BUG=697665, 646711, 698057 Review-Url: https://codereview.chromium.org/2726203002 Cr-Commit-Position: refs/heads/master@{#454433} Committed: https://chromium.googlesource.com/chromium/src/+/d005809c83c0ad0b9cbbda6b10b7ed2c3dcd5120

Patch Set 1 #

Patch Set 2 : Original CL #

Patch Set 3 : Fix #

Total comments: 10

Patch Set 4 : Fix unittest. #

Patch Set 5 : Update year in comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2449 lines, -762 lines) Patch
M chrome/browser/BUILD.gn View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/translate/chrome_translate_client.cc View 2 chunks +8 lines, -5 lines 0 comments Download
A chrome/browser/translate/translate_ranker_factory.h View 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/translate/translate_ranker_factory.cc View 1 chunk +48 lines, -0 lines 0 comments Download
A + chrome/browser/translate/translate_ranker_metrics_provider.h View 3 chunks +5 lines, -5 lines 0 comments Download
A chrome/browser/translate/translate_ranker_metrics_provider.cc View 1 chunk +32 lines, -0 lines 0 comments Download
M components/translate/core/browser/BUILD.gn View 3 chunks +10 lines, -4 lines 0 comments Download
A components/translate/core/browser/mock_translate_ranker.h View 1 chunk +65 lines, -0 lines 0 comments Download
A components/translate/core/browser/mock_translate_ranker.cc View 1 chunk +51 lines, -0 lines 0 comments Download
M components/translate/core/browser/proto/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A components/translate/core/browser/proto/ranker_model.proto View 1 chunk +49 lines, -0 lines 0 comments Download
M components/translate/core/browser/proto/translate_ranker_model.proto View 2 chunks +5 lines, -2 lines 0 comments Download
A components/translate/core/browser/ranker_model.h View 1 chunk +46 lines, -0 lines 0 comments Download
A components/translate/core/browser/ranker_model.cc View 1 chunk +54 lines, -0 lines 0 comments Download
A components/translate/core/browser/ranker_model_loader.h View 1 chunk +139 lines, -0 lines 0 comments Download
A components/translate/core/browser/ranker_model_loader.cc View 1 chunk +420 lines, -0 lines 0 comments Download
A components/translate/core/browser/ranker_model_loader_unittest.cc View 1 chunk +374 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_manager.h View 3 chunks +3 lines, -0 lines 0 comments Download
M components/translate/core/browser/translate_manager.cc View 2 4 chunks +24 lines, -21 lines 0 comments Download
M components/translate/core/browser/translate_manager_unittest.cc View 6 chunks +6 lines, -4 lines 0 comments Download
M components/translate/core/browser/translate_ranker.h View 2 1 chunk +20 lines, -83 lines 0 comments Download
D components/translate/core/browser/translate_ranker.cc View 1 chunk +0 lines, -311 lines 0 comments Download
A components/translate/core/browser/translate_ranker_impl.h View 1 2 3 1 chunk +136 lines, -0 lines 0 comments Download
A components/translate/core/browser/translate_ranker_impl.cc View 1 2 3 1 chunk +289 lines, -0 lines 0 comments Download
A components/translate/core/browser/translate_ranker_impl_unittest.cc View 1 2 3 1 chunk +341 lines, -0 lines 0 comments Download
D components/translate/core/browser/translate_ranker_metrics_provider.h View 1 chunk +0 lines, -28 lines 0 comments Download
D components/translate/core/browser/translate_ranker_metrics_provider.cc View 1 chunk +0 lines, -37 lines 0 comments Download
D components/translate/core/browser/translate_ranker_unittest.cc View 1 chunk +0 lines, -236 lines 0 comments Download
M components/translate/core/browser/translate_ui_delegate_unittest.cc View 4 chunks +7 lines, -3 lines 0 comments Download
M components/translate/core/browser/translate_url_fetcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M ios/chrome/browser/metrics/BUILD.gn View 2 chunks +1 line, -1 line 0 comments Download
M ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm View 2 chunks +1 line, -1 line 0 comments Download
M ios/chrome/browser/translate/BUILD.gn View 2 chunks +6 lines, -0 lines 0 comments Download
M ios/chrome/browser/translate/chrome_ios_translate_client.mm View 3 chunks +8 lines, -2 lines 0 comments Download
A ios/chrome/browser/translate/translate_ranker_factory.h View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
A ios/chrome/browser/translate/translate_ranker_factory.cc View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A + ios/chrome/browser/translate/translate_ranker_metrics_provider.h View 3 chunks +5 lines, -5 lines 0 comments Download
A ios/chrome/browser/translate/translate_ranker_metrics_provider.cc View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
M ios/web_view/internal/translate/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web_view/internal/translate/web_view_translate_client.mm View 2 chunks +4 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/web_view_translate_ranker_factory.h View 1 2 3 4 1 chunk +48 lines, -0 lines 0 comments Download
A ios/web_view/internal/translate/web_view_translate_ranker_factory.cc View 1 2 3 4 1 chunk +47 lines, -0 lines 0 comments Download
M net/url_request/test_url_fetcher_factory.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 3 chunks +10 lines, -10 lines 0 comments Download

Messages

Total messages: 27 (15 generated)
hamelphi
3 years, 9 months ago (2017-03-02 17:19:01 UTC) #5
asanka
/net/ lgtm
3 years, 9 months ago (2017-03-02 20:53:36 UTC) #12
rkaplow
lgtm
3 years, 9 months ago (2017-03-02 20:54:52 UTC) #13
sdefresne
lgtm (with comments) https://codereview.chromium.org/2726203002/diff/40001/ios/chrome/browser/translate/translate_ranker_factory.cc File ios/chrome/browser/translate/translate_ranker_factory.cc (right): https://codereview.chromium.org/2726203002/diff/40001/ios/chrome/browser/translate/translate_ranker_factory.cc#newcode1 ios/chrome/browser/translate/translate_ranker_factory.cc:1: // Copyright 2014 The Chromium Authors. ...
3 years, 9 months ago (2017-03-02 21:54:10 UTC) #14
hamelphi
https://codereview.chromium.org/2726203002/diff/40001/ios/chrome/browser/translate/translate_ranker_factory.cc File ios/chrome/browser/translate/translate_ranker_factory.cc (right): https://codereview.chromium.org/2726203002/diff/40001/ios/chrome/browser/translate/translate_ranker_factory.cc#newcode1 ios/chrome/browser/translate/translate_ranker_factory.cc:1: // Copyright 2014 The Chromium Authors. All rights reserved. ...
3 years, 9 months ago (2017-03-02 22:01:00 UTC) #15
fdoray
lgtm
3 years, 9 months ago (2017-03-02 22:06:47 UTC) #16
groby-ooo-7-16
Changes against PS2 LGTM But: My longer term concern is that this only papers over ...
3 years, 9 months ago (2017-03-02 22:37:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2726203002/80001
3 years, 9 months ago (2017-03-02 22:38:28 UTC) #20
hamelphi
On 2017/03/02 22:37:05, groby wrote: > Changes against PS2 LGTM > > But: My longer ...
3 years, 9 months ago (2017-03-02 22:43:03 UTC) #21
hamelphi
Thanks everyone for the quick review. I really appreciate it.
3 years, 9 months ago (2017-03-02 22:43:56 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/d005809c83c0ad0b9cbbda6b10b7ed2c3dcd5120
3 years, 9 months ago (2017-03-02 23:39:14 UTC) #25
hamelphi
3 years, 9 months ago (2017-03-08 13:47:44 UTC) #27
Message was sent while issue was closed.
On 2017/03/02 23:39:14, commit-bot: I haz the power wrote:
> Committed patchset #5 (id:80001) as
>
https://chromium.googlesource.com/chromium/src/+/d005809c83c0ad0b9cbbda6b10b7...

This issue has been reverted: https://codereview.chromium.org/2736853004

Powered by Google App Engine
This is Rietveld 408576698