Skip to content

Commit 04ae61b

Browse files
committed
test integer keyed params
1 parent 9102ce5 commit 04ae61b

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

mlos_bench/mlos_bench/tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@
6969
"range": [0, 1000000000]
7070
}
7171
}
72+
},
73+
"integer_keyed": {
74+
"cost": 0,
75+
"params": {
76+
"123": {
77+
"description": "A parameter with an integer key",
78+
"type": "int",
79+
"default": 2,
80+
"range": [1, 3]
81+
}
82+
}
7283
}
7384
}
7485
"""

mlos_bench/mlos_bench/tests/tunables/tunable_to_configspace_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ def configuration_space() -> ConfigurationSpace:
3838
"idle": ["halt", "mwait", "noidle"],
3939
"kernel_sched_migration_cost_ns": (-1, 500000),
4040
"kernel_sched_latency_ns": (0, 1000000000),
41+
"123": (1, 3),
4142
})
4243

4344
spaces["vmSize"].default_value = "Standard_B4ms"
4445
spaces["idle"].default_value = "halt"
4546
spaces["kernel_sched_migration_cost_ns"].default_value = -1
4647
spaces["kernel_sched_latency_ns"].default_value = 2000000
48+
spaces["123"].default_value = 2
4749

4850
return spaces
4951

mlos_bench/mlos_bench/tests/tunables/tunables_str_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ def test_tunable_groups_str(tunable_groups: TunableGroups) -> None:
1818
"""
1919
# Same as `tunable_groups` (defined in the `conftest.py` file), but in different order:
2020
tunables_other = TunableGroups({
21+
"integer_keyed": {
22+
"cost": 0,
23+
"params": {
24+
"123": {
25+
"description": "A parameter with an integer key",
26+
"type": "int",
27+
"default": 2,
28+
"range": [1, 3]
29+
}
30+
}
31+
},
2132
"kernel": {
2233
"cost": 1,
2334
"params": {

0 commit comments

Comments
 (0)