Skip to content

Commit

Permalink
wip: fix more tests to include the integer parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Nov 17, 2023
1 parent c880d5f commit 7d3c5fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mlos_bench/mlos_bench/tests/optimizers/mock_opt_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ def mock_configurations_no_defaults() -> list:
"""
return [
({
"123": 2,
"vmSize": "Standard_B4ms",
"idle": "halt",
"kernel_sched_migration_cost_ns": 13111,
"kernel_sched_latency_ns": 796233790,
}, 88.88),
({
"123": 3,
"vmSize": "Standard_B2ms",
"idle": "halt",
"kernel_sched_migration_cost_ns": 117025,
"kernel_sched_latency_ns": 149827706,
}, 66.66),
({
"123": 1,
"vmSize": "Standard_B4ms",
"idle": "halt",
"kernel_sched_migration_cost_ns": 354784,
Expand All @@ -48,6 +51,7 @@ def mock_configurations(mock_configurations_no_defaults: list) -> list:
"""
return [
({
"123": 2,
"vmSize": "Standard_B4ms",
"idle": "halt",
"kernel_sched_migration_cost_ns": -1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,28 @@ def mock_configs() -> List[dict]:
"""
return [
{
'123': 2,
'vmSize': 'Standard_B4ms',
'idle': 'halt',
'kernel_sched_migration_cost_ns': 50000,
'kernel_sched_latency_ns': 1000000,
},
{
'123': 1,
'vmSize': 'Standard_B4ms',
'idle': 'halt',
'kernel_sched_migration_cost_ns': 40000,
'kernel_sched_latency_ns': 2000000,
},
{
'123': 3,
'vmSize': 'Standard_B4ms',
'idle': 'mwait',
'kernel_sched_migration_cost_ns': 100000,
'kernel_sched_latency_ns': 3000000,
},
{
'123': 2,
'vmSize': 'Standard_B2s',
'idle': 'mwait',
'kernel_sched_migration_cost_ns': 200000,
Expand Down Expand Up @@ -109,7 +113,8 @@ def _test_opt_update_max(opt: Optimizer, configs: List[dict],
"vmSize": "Standard_B2s",
"idle": "mwait",
"kernel_sched_migration_cost_ns": 200000,
'kernel_sched_latency_ns': 4000000,
"kernel_sched_latency_ns": 4000000,
"123": 2,
}


Expand Down

0 comments on commit 7d3c5fc

Please sign in to comment.