Commit a7423d3e authored by alanlxl's avatar alanlxl Committed by Commit Bot

Turn on SmartDimNewMlAgent by default

SmartDimNewMlAgent is ready to roll out to 100% stable, this CL turns the
feature kSmartDimNewMlAgent on by default, and removes SmartDimNewMlAgent from
fieldtrial_testing_config.json.

Bug: 1067048
Test: Test on DUT and it downloads the default version model.
Change-Id: I72014365a32d19870401cebe59879872b4c4ab4e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355355Reviewed-by: default avatarAndrew Moylan <amoylan@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Xinglong Luan <alanlxl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798941}
parent 932b2810
...@@ -987,13 +987,12 @@ TEST_P(UserActivityManagerTest, ScreenDimDeferredWithFinalEvent) { ...@@ -987,13 +987,12 @@ TEST_P(UserActivityManagerTest, ScreenDimDeferredWithFinalEvent) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
// sigmoid(0.43) * 100 = 60 // sigmoid(0.43) * 100 = 60
...@@ -1043,13 +1042,12 @@ TEST_P(UserActivityManagerTest, ScreenDimDeferredWithoutFinalEvent) { ...@@ -1043,13 +1042,12 @@ TEST_P(UserActivityManagerTest, ScreenDimDeferredWithoutFinalEvent) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
// sigmoid(0.43) * 100 = 60 // sigmoid(0.43) * 100 = 60
...@@ -1084,13 +1082,12 @@ TEST_P(UserActivityManagerTest, ScreenDimRequestCanceled) { ...@@ -1084,13 +1082,12 @@ TEST_P(UserActivityManagerTest, ScreenDimRequestCanceled) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
// sigmoid(0.43) * 100 = 60 // sigmoid(0.43) * 100 = 60
...@@ -1132,13 +1129,12 @@ TEST_P(UserActivityManagerTest, ScreenDimConsecutiveRequests) { ...@@ -1132,13 +1129,12 @@ TEST_P(UserActivityManagerTest, ScreenDimConsecutiveRequests) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
// sigmoid(0.43) * 100 = 60 // sigmoid(0.43) * 100 = 60
...@@ -1192,13 +1188,12 @@ TEST_P(UserActivityManagerTest, ScreenDimNotDeferred) { ...@@ -1192,13 +1188,12 @@ TEST_P(UserActivityManagerTest, ScreenDimNotDeferred) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
// sigmoid(0.43) * 100 = 60 // sigmoid(0.43) * 100 = 60
...@@ -1240,13 +1235,12 @@ TEST_P(UserActivityManagerTest, TwoScreenDimImminentWithEventInBetween) { ...@@ -1240,13 +1235,12 @@ TEST_P(UserActivityManagerTest, TwoScreenDimImminentWithEventInBetween) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
model_.set_decision_threshold(50); model_.set_decision_threshold(50);
...@@ -1334,13 +1328,12 @@ TEST_P(UserActivityManagerTest, TwoScreenDimImminentWithoutEventInBetween) { ...@@ -1334,13 +1328,12 @@ TEST_P(UserActivityManagerTest, TwoScreenDimImminentWithoutEventInBetween) {
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
if (use_new_ml_agent_) { if (use_new_ml_agent_) {
SmartDimMlAgent::GetInstance()->ResetForTesting(); SmartDimMlAgent::GetInstance()->ResetForTesting();
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params},
{features::kSmartDimNewMlAgent, {{}}}},
{});
} else {
scoped_feature_list.InitAndEnableFeatureWithParameters( scoped_feature_list.InitAndEnableFeatureWithParameters(
features::kUserActivityPrediction, params); features::kUserActivityPrediction, params);
} else {
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
} }
model_.set_decision_threshold(50); model_.set_decision_threshold(50);
...@@ -1416,8 +1409,12 @@ TEST_P(UserActivityManagerTest, ModelError) { ...@@ -1416,8 +1409,12 @@ TEST_P(UserActivityManagerTest, ModelError) {
const std::map<std::string, std::string> params = { const std::map<std::string, std::string> params = {
{"dim_threshold", "0.651"}}; {"dim_threshold", "0.651"}};
base::test::ScopedFeatureList scoped_feature_list; base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeatureWithParameters( // This ModelError only happens in old SmartDimModel, not for new ml_agent.
features::kUserActivityPrediction, params); // Now that the new ml_agent is the default behavior, we need to disable
// kSmartDimNewMlAgent for this test.
scoped_feature_list.InitWithFeaturesAndParameters(
{{features::kUserActivityPrediction, params}},
{{features::kSmartDimNewMlAgent, {{}}}});
// This value will trigger a model error. // This value will trigger a model error.
model_.set_inactivity_score(160); model_.set_inactivity_score(160);
......
...@@ -448,7 +448,7 @@ const base::Feature kSmartDimExperimentalComponent{ ...@@ -448,7 +448,7 @@ const base::Feature kSmartDimExperimentalComponent{
// Uses the smart dim component updater to provide smart dim model and // Uses the smart dim component updater to provide smart dim model and
// preprocessor configuration. // preprocessor configuration.
const base::Feature kSmartDimNewMlAgent{"SmartDimNewMlAgent", const base::Feature kSmartDimNewMlAgent{"SmartDimNewMlAgent",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// Uses the V3 (~2019-05 era) Smart Dim model instead of the default V2 // Uses the V3 (~2019-05 era) Smart Dim model instead of the default V2
// (~2018-11) model. // (~2018-11) model.
......
...@@ -6450,34 +6450,6 @@ ...@@ -6450,34 +6450,6 @@
] ]
} }
], ],
"SmartDimNewMlAgent": [
{
"platforms": [
"chromeos"
],
"experiments": [
{
"name": "EnabledWithExperimentalVersion_20200728",
"params": {
"smart_dim_experimental_version": "20200601.1"
},
"enable_features": [
"SmartDimExperimentalComponent",
"SmartDimNewMlAgent"
]
},
{
"name": "EnabledWithDefaultVersion_20200728",
"enable_features": [
"SmartDimNewMlAgent"
],
"disable_features": [
"SmartDimExperimentalComponent"
]
}
]
}
],
"SplitCacheByNetworkIsolationKey": [ "SplitCacheByNetworkIsolationKey": [
{ {
"platforms": [ "platforms": [
......
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