Skip to content

Commit f7eb5f1

Browse files
[Personalizer] Change experimental unit duration to valid value in tests (Azure#24741)
* changed eud in tests * test failure * re-recorded multislot tests Co-authored-by: orenmichaely <[email protected]>
1 parent 339ceda commit f7eb5f1

File tree

6 files changed

+1552
-2595
lines changed

6 files changed

+1552
-2595
lines changed

sdk/personalizer/Azure.AI.Personalizer/tests/Infrastructure/PersonalizerTestBase.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,12 @@ protected PersonalizerAdministrationClient GetAdministrationClient(bool isSingle
4848
private async Task EnableMultiSlot(PersonalizerAdministrationClient adminClient)
4949
{
5050
PersonalizerServiceProperties properties = await adminClient.GetPersonalizerPropertiesAsync();
51-
if (properties.IsAutoOptimizationEnabled != false)
52-
{
53-
properties.IsAutoOptimizationEnabled = false;
54-
await adminClient.UpdatePersonalizerPropertiesAsync(properties);
55-
await Task.Delay(30000);
56-
await adminClient.UpdatePersonalizerPolicyAsync(new PersonalizerPolicy("multiSlot", "--ccb_explore_adf --epsilon 0.2 --power_t 0 -l 0.001 --cb_type mtr -q ::"));
57-
//sleep 30 seconds to allow settings to propagate
58-
await Task.Delay(30000);
59-
}
51+
properties.IsAutoOptimizationEnabled = false;
52+
await adminClient.UpdatePersonalizerPropertiesAsync(properties);
53+
await Task.Delay(30000);
54+
await adminClient.UpdatePersonalizerPolicyAsync(new PersonalizerPolicy("multiSlot", "--ccb_explore_adf --epsilon 0.2 --power_t 0 -l 0.001 --cb_type mtr -q ::"));
55+
//sleep 30 seconds to allow settings to propagate
56+
await Task.Delay(30000);
6057
}
6158
}
6259
}

sdk/personalizer/Azure.AI.Personalizer/tests/Personalizer/ConfigurationsTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ConfigurationsTests(bool isAsync): base(isAsync)
1616
[Test]
1717
public async Task ConfigurationTests()
1818
{
19-
TimeSpan newExperimentalUnitDuration = TimeSpan.FromSeconds(7);
19+
TimeSpan newExperimentalUnitDuration = TimeSpan.FromHours(4);
2020
TimeSpan modelExportFrequency = TimeSpan.FromMinutes(3);
2121
double newDefaultReward = 1.0;
2222
string newRewardFuntion = "average";

0 commit comments

Comments
 (0)