Skip to content

Commit

Permalink
Switch model execution feature 1 to compose
Browse files Browse the repository at this point in the history
Change-Id: I00e15cbd503a613cd40c7ccc4afe843b428f0de0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4939597
Commit-Queue: Sophie Chang <sophiechang@chromium.org>
Reviewed-by: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1209758}
  • Loading branch information
Sophie Chang authored and Chromium LUCI CQ committed Oct 14, 2023
1 parent 7c19772 commit a015563
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/compose/chrome_compose_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void ChromeComposeClient::Compose(compose::mojom::StyleModifiersPtr style,
*request.mutable_page_metadata() = std::move(page_metadata);
model_executor->ExecuteModel(
optimization_guide::proto::ModelExecutionFeature::
MODEL_EXECUTION_FEATURE_1,
MODEL_EXECUTION_FEATURE_COMPOSE,
request,
base::BindOnce(&ChromeComposeClient::ModelExecutionCallback,
weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ std::string_view GetStringNameForModelExecutionFeature(
return "WallpaperSearch";
case proto::ModelExecutionFeature::MODEL_EXECUTION_FEATURE_TAB_ORGANIZATION:
return "TabOrganization";
case proto::ModelExecutionFeature::MODEL_EXECUTION_FEATURE_COMPOSE:
return "Compose";
case proto::ModelExecutionFeature::MODEL_EXECUTION_FEATURE_UNSPECIFIED:
case proto::ModelExecutionFeature::MODEL_EXECUTION_FEATURE_1:
return "Unknown";
// Must be in sync with the ModelExecutionFeature variant in
// optimization/histograms.xml for metric recording.
Expand Down
2 changes: 1 addition & 1 deletion components/optimization_guide/proto/model_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ message ExecuteResponse {

enum ModelExecutionFeature {
MODEL_EXECUTION_FEATURE_UNSPECIFIED = 0;
MODEL_EXECUTION_FEATURE_1 = 1;
MODEL_EXECUTION_FEATURE_COMPOSE = 1;
MODEL_EXECUTION_FEATURE_TAB_ORGANIZATION = 2;
MODEL_EXECUTION_FEATURE_WALLPAPER_SEARCH = 3;
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ chromium-metrics-reviews@google.com.
</variants>

<variants name="ModelExecutionFeature">
<variant name="Compose" summary="Compose"/>
<variant name="TabOrganization" summary="Tab Organization"/>
<variant name="Unknown" summary="Unknown"/>
<variant name="WallpaperSearch" summary="Wallpaper search"/>
Expand Down

0 comments on commit a015563

Please sign in to comment.