Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor config examples directory structure #313

Merged
merged 166 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
7025226
wip: reorg examples/configs to a more consistent layout and start doc…
bpkroth Apr 22, 2023
bf98ec6
include the config examples in the package
bpkroth Apr 22, 2023
ef8b432
distribute the config directory
bpkroth Apr 22, 2023
19c781e
fixme comments
bpkroth Apr 22, 2023
2fdc1f2
reworks to include more package data
bpkroth Apr 24, 2023
90a20ad
remove that for now - work on removing tests separately
bpkroth Apr 24, 2023
1e6a40c
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 25, 2023
9590155
fixups to exclude tests from the wheel file
bpkroth Apr 25, 2023
152f907
also exclude the test files even from the sdist tars
bpkroth Apr 25, 2023
9cb1311
Merge branch 'fixup-wheel-to-omit-tests' into refactor-config-example…
bpkroth Apr 25, 2023
8f2b446
test that the configs got included in the wheel
bpkroth Apr 25, 2023
3602c9a
fixups
bpkroth Apr 25, 2023
11defaf
applying some PR suggestions
bpkroth Apr 25, 2023
28ca171
rule cleanup
bpkroth Apr 25, 2023
caea7bc
Merge branch 'main' into fixup-wheel-to-omit-tests
bpkroth Apr 25, 2023
4470ee9
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 25, 2023
7184e52
finish reorg after merge
bpkroth Apr 25, 2023
fa03d05
Merge branch 'fixup-wheel-to-omit-tests' into refactor-config-example…
bpkroth Apr 25, 2023
75d70e0
improve path lookup
bpkroth Apr 25, 2023
7d792dc
automatically add the modules included configs to the search path
bpkroth Apr 25, 2023
db0491e
more reorgs
bpkroth Apr 25, 2023
b7cc9c9
fixups to tests for new paths
bpkroth Apr 25, 2023
06eb4ee
add more tests for default path
bpkroth Apr 25, 2023
57c183f
more path fixups
bpkroth Apr 25, 2023
ed67569
more path fixups
bpkroth Apr 25, 2023
f96919b
restore a file and move it to the right place
bpkroth Apr 25, 2023
41f3c59
fixups
bpkroth Apr 25, 2023
c86b8a1
fixups
bpkroth Apr 25, 2023
d9a95bc
reorg
bpkroth Apr 25, 2023
43123fe
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 26, 2023
c660826
fix inconsistent plurals
bpkroth Apr 26, 2023
6becd2c
more rename cleanup
bpkroth Apr 26, 2023
ca3e9fe
rename cleanup
bpkroth Apr 26, 2023
3edeaf3
a few more rename fixups
bpkroth Apr 26, 2023
f9b1a1b
more renames
bpkroth Apr 26, 2023
85a2172
pylint fixups
bpkroth Apr 26, 2023
25f0edf
add conditional dependency for importlib_resources for python 3.8
bpkroth Apr 26, 2023
5128ca1
fixups
bpkroth Apr 26, 2023
17f692f
stubbing some new test files out
bpkroth Apr 26, 2023
29d165b
include rename in the devcontainer
bpkroth Apr 26, 2023
a3f3877
licenseheaders
bpkroth Apr 26, 2023
2764bd2
more ciruclar import fixups
bpkroth Apr 26, 2023
dcf49f2
don't need that path anymore
bpkroth Apr 26, 2023
5f6123d
apparently importlib.resources has a circular import bug in python 3.…
bpkroth Apr 26, 2023
e55d32d
rework how dependencies are specified
bpkroth Apr 26, 2023
07ceebe
initial work to test loading storage configs
bpkroth Apr 26, 2023
732131f
move some files around
bpkroth Apr 26, 2023
870ad33
docstrings
bpkroth Apr 26, 2023
bc0aeee
forgot to add helper fn
bpkroth Apr 26, 2023
8fd63be
setup fixups
bpkroth Apr 26, 2023
dd5fdb4
fixup
bpkroth Apr 26, 2023
75aa43a
cleanup storage loading tests
bpkroth Apr 26, 2023
f5344d7
reworks to allow loading class name
bpkroth Apr 26, 2023
8be35fc
fixup path
bpkroth Apr 26, 2023
2c0fede
make that a property
bpkroth Apr 26, 2023
5553ed7
work to test loading optimizers
bpkroth Apr 26, 2023
10b4353
more path reworkds
bpkroth Apr 26, 2023
242b91c
refactor and start adding tests for service loading
bpkroth Apr 26, 2023
1e26617
fixups
bpkroth Apr 26, 2023
e92f836
start adding environment tests
bpkroth Apr 26, 2023
82da183
adding mock vm ops services
bpkroth Apr 26, 2023
9301a7e
more work on testing environments
bpkroth Apr 26, 2023
181e391
TODO notes
bpkroth Apr 26, 2023
0fa05a9
wip
bpkroth Apr 27, 2023
9592a3f
rename the mlos_core env
bpkroth Apr 27, 2023
45248aa
splitting some things out
bpkroth Apr 27, 2023
c54c571
fixup
bpkroth Apr 27, 2023
c599e1a
fixups
bpkroth Apr 27, 2023
842de69
rename devcontainer too
bpkroth Apr 27, 2023
6a99243
add rename to the docker container - pulled from #313
bpkroth Apr 27, 2023
17874c9
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 28, 2023
8cb6b0a
Merge branch 'rename-mlos_core-conda-envs' into refactor-config-examp…
bpkroth Apr 28, 2023
fa02f52
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 28, 2023
b3e6e39
comments
bpkroth Apr 28, 2023
ced3bf5
style and pylint fixups
bpkroth Apr 28, 2023
07ae702
fixup
bpkroth Apr 28, 2023
f448b02
tweak
bpkroth Apr 28, 2023
f714243
wip: fixups for llamatune
bpkroth Apr 28, 2023
4478720
some circular import cleanup in preparation for config reorgs and imp…
bpkroth Apr 28, 2023
02fa335
make the publicly accessible version a property
bpkroth Apr 28, 2023
ffeb6b0
Merge branch 'main' into fixup-for-circular-imports
bpkroth Apr 28, 2023
a36597b
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 28, 2023
9871cae
Merge remote-tracking branch 'origin/fixup-for-circular-imports' into…
bpkroth Apr 28, 2023
1a3bf88
cleanup
bpkroth Apr 28, 2023
c809f7e
unnecessary?
bpkroth Apr 28, 2023
805e9b8
test fixups
bpkroth Apr 28, 2023
830d524
cleanup
bpkroth Apr 28, 2023
b09e7a9
allow llamma tune to always reverse the default config
bpkroth Apr 28, 2023
325a44f
new value
bpkroth Apr 28, 2023
a079277
Merge branch 'main' into support-first-suggestion-as-default
bpkroth Apr 28, 2023
0d998b0
Merge remote-tracking branch 'origin/support-first-suggestion-as-defa…
bpkroth Apr 28, 2023
e08b684
Merge remote-tracking branch 'origin/fixup-for-circular-imports' into…
bpkroth Apr 28, 2023
1b44929
remove an unnecessary edit
bpkroth Apr 28, 2023
c4f5e8d
docstring
bpkroth Apr 28, 2023
c5b380b
stale file
bpkroth Apr 28, 2023
0822c42
merge fixups
bpkroth Apr 28, 2023
8c1b809
remove todo comment
bpkroth Apr 28, 2023
df40f0e
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 28, 2023
5dd7321
Merge branch 'main' into refactor-config-examples-dirs
bpkroth Apr 29, 2023
375ff97
test fixups
bpkroth May 1, 2023
6baabcf
handle null categorical values and disallow duplicate values
bpkroth May 1, 2023
e1cf2c0
add local mock exec service
bpkroth May 1, 2023
6f81b5b
add more mock services
bpkroth May 1, 2023
5fbbc82
sort imports
bpkroth May 1, 2023
8105501
more mock services and tunables fixups
bpkroth May 1, 2023
c73f16f
pylint fixups, spelling, more tests for tunable groups loading, and m…
bpkroth May 1, 2023
7c46334
wip: merge tunables upstream only
bpkroth May 1, 2023
73f2a51
todos
bpkroth May 1, 2023
dd42ee8
fixup
bpkroth May 1, 2023
6609055
fixups
bpkroth May 1, 2023
c0d1b2d
fixups
bpkroth May 1, 2023
523e532
test fixups
bpkroth May 2, 2023
8ba966d
fixups
bpkroth May 2, 2023
e7ec685
more fixups
bpkroth May 2, 2023
7d1ad8b
comments from PR suggestions
bpkroth May 2, 2023
4cbee54
reorg scripts
bpkroth May 2, 2023
a58b9f8
reorg scripts
bpkroth May 2, 2023
37c3753
Merge branch 'main' into refactor-config-examples-dirs
bpkroth May 2, 2023
245221e
fixups
bpkroth May 2, 2023
f5e784a
tweak
bpkroth May 2, 2023
a96127d
Merge branch 'main' into refactor-config-examples-dirs
bpkroth May 2, 2023
048f63b
fixup bad merge
bpkroth May 2, 2023
629fc18
wip: splitting out tweaks to covariant group names and null value pro…
bpkroth May 2, 2023
81c6ef8
add a test for duplicate values being disallowed
bpkroth May 2, 2023
0f0bf2e
adding some tests for changes to tunable assignment/definition behavior
bpkroth May 2, 2023
72d22b0
fixup
bpkroth May 2, 2023
4a8bcdf
add some additional tests
bpkroth May 2, 2023
4dfb716
fixup
bpkroth May 2, 2023
906abfa
wip: split out work on building up tunable groups with unique instanc…
bpkroth May 2, 2023
0cbfc69
more tests and fixups
bpkroth May 2, 2023
9b04372
tests and fixes
bpkroth May 2, 2023
fa4f7fa
adding more tests
bpkroth May 2, 2023
4efed7d
more test coverage
bpkroth May 2, 2023
e21995b
more test coverage
bpkroth May 2, 2023
052b9aa
more tests
bpkroth May 2, 2023
f07fd1e
Merge branch 'tunables-null-handling' into tunable-groups-instance-re…
bpkroth May 2, 2023
2cbafb6
adding initial tests for tunable group merging
bpkroth May 2, 2023
222b89c
comments
bpkroth May 2, 2023
5986a6b
mypy cleanup
bpkroth May 2, 2023
bc53420
tweaks error handling and more tests
bpkroth May 2, 2023
724843a
Merge branch 'tunables-null-handling' into refactor-config-examples-dirs
bpkroth May 2, 2023
fd8201d
Merge branch 'tunable-groups-instance-references' into refactor-confi…
bpkroth May 2, 2023
0450073
Merge branch 'main' into refactor-config-examples-dirs
bpkroth May 3, 2023
1c856ff
link fixup
bpkroth May 3, 2023
8ba21fc
cleanup readme a little
bpkroth May 3, 2023
eaec0b2
remove completed todos
bpkroth May 3, 2023
c72dabf
Update mlos_bench/mlos_bench/tests/config/cli/mock-1shot.jsonc
bpkroth May 3, 2023
82d088b
bad merge
bpkroth May 3, 2023
92c82be
fixup
bpkroth May 3, 2023
dc11eb4
rework covariant group merge compatibility check
bpkroth May 3, 2023
c929701
return None not 'None'
bpkroth May 3, 2023
f3539ba
fixups
bpkroth May 3, 2023
0780d33
fixup score calc
bpkroth May 3, 2023
44368c7
remove useless lines
bpkroth May 3, 2023
a3db514
fixup
bpkroth May 3, 2023
7d4b8c4
try to fixup some bug with 3.9 discovering which conf files use
bpkroth May 3, 2023
4a7e954
fixup
bpkroth May 3, 2023
9025ec7
fixups for windows
bpkroth May 3, 2023
526d189
use normal string replacement
bpkroth May 3, 2023
905ff73
standardize on '/' there too
bpkroth May 3, 2023
1c6c824
more path fixups
bpkroth May 3, 2023
f8b82a6
moved these to github issues
bpkroth May 3, 2023
5d1b546
Merge branch 'main' into refactor-config-examples-dirs
bpkroth May 3, 2023
ef04fca
Merge branch 'main' into refactor-config-examples-dirs
bpkroth May 3, 2023
dafaa95
fixups after merge from main
bpkroth May 3, 2023
48c7d15
fixup
bpkroth May 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dataframe",
"discretization",
"discretize",
"drivername",
"dtype",
"duckdb",
"emukit",
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ mypy: conda-env build/mypy.mlos_core.${CONDA_ENV_NAME}.build-stamp build/mypy.ml
build/mypy.mlos_core.${CONDA_ENV_NAME}.build-stamp: $(MLOS_CORE_PYTHON_FILES)
build/mypy.mlos_bench.${CONDA_ENV_NAME}.build-stamp: $(MLOS_BENCH_PYTHON_FILES) build/mypy.mlos_core.${CONDA_ENV_NAME}.build-stamp

NON_MYPY_FILES := scripts/dmypy-wrapper.sh build/conda-env.${CONDA_ENV_NAME}.build-stamp build/mypy.mlos_core.${CONDA_ENV_NAME}.build-stamp setup.cfg
build/mypy.%.${CONDA_ENV_NAME}.build-stamp: scripts/dmypy-wrapper.sh build/conda-env.${CONDA_ENV_NAME}.build-stamp setup.cfg
conda run -n ${CONDA_ENV_NAME} scripts/dmypy-wrapper.sh \
$(filter-out scripts/dmypy-wrapper.sh build/*.build-stamp setup.cfg,$+)
$(filter-out $(NON_MYPY_FILES),$+)
touch $@


Expand Down Expand Up @@ -204,6 +205,7 @@ mlos_bench/dist/tmp/mlos-bench-latest.tar: PACKAGE_NAME := mlos-bench
cd $(MODULE_NAME)/ && conda run -n ${CONDA_ENV_NAME} python3 setup.py sdist --formats tar
ls $(MODULE_NAME)/dist/$(PACKAGE_NAME)-*.tar
! ( tar tf $(MODULE_NAME)/dist/$(PACKAGE_NAME)-*.tar | grep -m1 tests/ )
[ "$(MODULE_NAME)" != "mlos_bench" ] || tar tf $(MODULE_NAME)/dist/$(PACKAGE_NAME)-*.tar | grep -m1 mlos_bench/config/
cd $(MODULE_NAME)/dist/tmp && ln -s ../$(PACKAGE_NAME)-*.tar $(PACKAGE_NAME)-latest.tar

%-latest-py3-none-any.whl: build/conda-env.${CONDA_ENV_NAME}.build-stamp
Expand All @@ -214,6 +216,8 @@ mlos_bench/dist/tmp/mlos-bench-latest.tar: PACKAGE_NAME := mlos-bench
ls $(MODULE_NAME)/dist/$(MODULE_NAME)-*-py3-none-any.whl
# Check to make sure the tests were excluded from the wheel.
! ( unzip -t $(MODULE_NAME)/dist/$(MODULE_NAME)-*-py3-none-any.whl | grep -m1 tests/ )
# Check to make sure the mlos_bench module has the config directory.
[ "$(MODULE_NAME)" != "mlos_bench" ] || unzip -t $(MODULE_NAME)/dist/$(MODULE_NAME)-*-py3-none-any.whl | grep -m1 mlos_bench/config/
cd $(MODULE_NAME)/dist/tmp && ln -s ../$(MODULE_NAME)-*-py3-none-any.whl $(MODULE_NAME)-latest-py3-none-any.whl
motus marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: dist-test-env-clean
Expand All @@ -227,7 +231,7 @@ dist-test-env: dist build/dist-test-env.$(PYTHON_VERSION).build-stamp

build/dist-test-env.$(PYTHON_VERSION).build-stamp: build/conda-env.${CONDA_ENV_NAME}.build-stamp
# Use the same version of python as the one we used to build the wheels.
build/dist-test-env.$(PYTHON_VERSION).build-stamp: PYTHON_VERS_REQ=$(shell conda list -n ${CONDA_ENV_NAME} | egrep '^python\s+' | sed -r -e 's/^python\s+//' | cut -d' ' -f1)
build/dist-test-env.$(PYTHON_VERSION).build-stamp: PYTHON_VERS_REQ=$(shell conda list -n ${CONDA_ENV_NAME} | egrep '^python\s+' | sed -r -e 's/^python\s+//' | cut -d' ' -f1 | cut -d. -f1-2)
bpkroth marked this conversation as resolved.
Show resolved Hide resolved
build/dist-test-env.$(PYTHON_VERSION).build-stamp: mlos_core/dist/tmp/mlos_core-latest-py3-none-any.whl mlos_bench/dist/tmp/mlos_bench-latest-py3-none-any.whl
# Create a clean test environment for checking the wheel files.
$(MAKE) dist-test-env-clean
Expand All @@ -236,6 +240,8 @@ build/dist-test-env.$(PYTHON_VERSION).build-stamp: mlos_core/dist/tmp/mlos_core-
conda run -n mlos-dist-test-$(PYTHON_VERSION) pip install "mlos_core/dist/tmp/mlos_core-latest-py3-none-any.whl[full-tests]"
# Test a clean install of the mlos_bench wheel.
conda run -n mlos-dist-test-$(PYTHON_VERSION) pip install "mlos_bench/dist/tmp/mlos_bench-latest-py3-none-any.whl[full-tests]"
# Test that the config dir for mlos_bench got distributed.
test -e `conda env list | grep "mlos-dist-test-$(PYTHON_VERSION) " | awk '{ print $$2 }'`/lib/python$(PYTHON_VERS_REQ)/site-packages/mlos_bench/config/README.md
touch $@

.PHONY: dist-test
Expand Down Expand Up @@ -338,7 +344,7 @@ build/check-doc.build-stamp: doc/build/html/index.html doc/build/html/htmlcov/in
test -s doc/build/html/generated/mlos_bench.environments.Environment.html
test -s doc/build/html/api/mlos_core/mlos_core.html
test -s doc/build/html/api/mlos_bench/mlos_bench.html
grep -q options: doc/build/html/api/mlos_bench/mlos_bench.run.html
grep -q -e '--config CONFIG' doc/build/html/api/mlos_bench/mlos_bench.run.html
bpkroth marked this conversation as resolved.
Show resolved Hide resolved
# Check doc logs for errors (but skip over some known ones) ...
@cat doc/build/log.txt \
| egrep -C1 -e WARNING -e CRITICAL -e ERROR \
Expand Down
2 changes: 1 addition & 1 deletion mlos_bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ All we have to do is specifying the [`Storage`](./mlos_bench/storage/) and [`Opt
}
```

> **NOTE:** A working example of this configuration can be found in our repository at [azure-redis-1shot.jsonc](examples/azure-redis-1shot.jsonc).
> **NOTE:** A working example of this configuration can be found in our repository at [azure-redis-1shot.jsonc](./mlos_bench/config/cli/azure-redis-1shot.jsonc).

The only difference between the two configurations is that the latter has the `optimizer` parameter instead of using a fixed set of tunables via `tunable_values` option.
It also stores the results of each trial in the SQLite3 database (configured via `storage`).
Expand Down
22 changes: 0 additions & 22 deletions mlos_bench/config/env-azure-ubuntu-redis.jsonc

This file was deleted.

15 changes: 0 additions & 15 deletions mlos_bench/config/optimizers/one_shot_opt.jsonc

This file was deleted.

56 changes: 0 additions & 56 deletions mlos_bench/config/tunables.jsonc

This file was deleted.

9 changes: 9 additions & 0 deletions mlos_bench/mlos_bench/config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `config` Examples Overview

The [`config`](./) directory contains a collection of scripts and config snippets that are used to configure the `mlos_bench` components.

These are meant to be used as examples and starting points for your own configuration, though some can be included as-is in your configuration (e.g. linux kernel configs).

In general the `config` directory layout follows that of the `mlos_bench` module/directory layout (e.g. `remote` and `local` `Environments` making using of `Services`, etc., each with their own `json` configs and shell scripts.).

Full end-to-end examples are provided in the [`cli`](./cli/) directory, and typically and make use of the [`CompositeEnvironments`](./environments/composite/) to combine multiple [`Environments`](./environments/), also referencing [`Services`](./services/), [`Storage`](./storage/), and [`Optimizer`](./optimizers/) configs, into a single [`mlos_bench`](../run.py) run.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"redis": {
"cost": 1,
"params": {
"hz": {
"description": "Background tasks frequency",
"type": "int",
"default": 10,
"range": [1, 500]
},
"dynamic_hz": {
"description": "Enable adaptive hz",
"type": "categorical",
"default": "yes",
"values": ["yes", "no"]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"name": "Generate Redis configuration",
"class": "mlos_bench.environments.local.LocalFileShareEnv",

"include_tunables": ["environments/apps/redis/redis-tunables.jsonc"],
"config": {
"tunable_params": ["redis"],

Expand All @@ -13,12 +14,13 @@
"dump_params_file": "redis-params.json",

"setup": [
"applications/generate_redis_config.py redis-params.json redis.cfg"
"environment/apps/redis/local/scripts/generate_redis_config.py redis-params.json redis.cfg"
],

// TODO: improve handling of relative paths
"upload": [
{"from": "redis.cfg", "to": "$experimentId/$trialId/input/redis.cfg"},
{"from": "redis/", "to": "$experimentId/$trialId/scripts"}
{"from": "remote/scripts/", "to": "$experimentId/$trialId/scripts"}
]
}
},
Expand All @@ -28,8 +30,8 @@
"name": "Benchmark Redis on Linux",
"class": "mlos_bench.environments.remote.RemoteEnv",

"include_tunables": ["environments/apps/redis/redis-tunables.jsonc"],
"config": {

"tunable_params": ["redis"],

"required_args": ["experimentId", "trialId", "mountPoint"],
Expand Down Expand Up @@ -61,8 +63,8 @@
"name": "Download and post-process Redis benchmark data",
"class": "mlos_bench.environments.local.LocalFileShareEnv",

"include_tunables": ["environments/apps/redis/redis-tunables.jsonc"],
"config": {

"tunable_params": ["redis"],

"required_args": ["experimentId", "trialId"],
Expand All @@ -75,7 +77,7 @@
],

"run": [
"applications/process_redis_results.py redis-bench-output/results.csv redis-benchmark.csv"
"environments/apps/redis/local/scripts/process_redis_results.py redis-bench-output/results.csv redis-benchmark.csv"
],

// Read benchmark results from a local CSV file:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "Azure VM Ubuntu Redis",
"class": "mlos_bench.environments.CompositeEnv",

"include_tunables": [
"environments/vm/azure/azure-vm-tunables.jsonc",
"environments/os/linux/boot/linux-boot-tunables.jsonc",
"environments/os/linux/runtime/linux-runtime-tunables.jsonc",
"environments/apps/redis/redis-tunables.jsonc"
],

"include_services": [
"services/remote/azure/service-linux-vm-ops.jsonc",
"services/remote/azure/service-fileshare.jsonc"
],

"config": {
"include_children": [
"environments/vm/azure/provision-ubuntu-vm.jsonc",
"environments/os/linux/boot/boot-ubuntu.jsonc",
"environments/os/linux/runtime/setup-ubuntu.jsonc",
"environments/apps/redis/redis.jsonc"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
"name": "Mock environment",
"class": "mlos_bench.environments.mock_env.MockEnv",

"include_tunables": ["tunables.jsonc"],
"include_tunables": [
"environments/apps/redis/redis-tunables.jsonc",
"environments/os/linux/runtime/linux-runtime-tunables.jsonc",
"environments/os/linux/boot/linux-boot-tunables.jsonc",
"environments/vm/azure/azure-vm-tunables.jsonc"
],

"config": {
"tunable_params": ["provision", "boot", "kernel", "redis"],
"tunable_params": ["azure-vm", "linux-kernel-boot", "linux-kernel-runtime", "redis"],
"required_args": ["experimentId", "trialId"],
"seed": 42, // Seed for the random noise generator. Omit to produce noise-free data.
"range": [60, 120] // Range of the generated output value of the benchmark.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
"name": "Generate boot parameters for a Ubuntu VM",
"class": "mlos_bench.environments.local.LocalFileShareEnv",

"config": {
"include_tunables": ["environments/os/linux/boot/linux-boot-tunables.jsonc"],

"tunable_params": ["boot"],
"config": {
"tunable_params": ["linux-kernel-boot"],

// Values provided from the global config/optimizer:
"required_args": ["experimentId", "trialId"],
Expand All @@ -26,8 +27,11 @@
// Dump tunable parameters to a local JSON file:
"dump_params_file": "boot-params.json",

// TODO: expand "setup" command to support array syntax like devcontainers so we can execute without a shell.
// In particular this should let us resolve the path to the script more easily.
// Alternatively: we could provide a "CWD" argument to the setup command.
"setup": [
"linux-boot/generate_grub_config.py boot-params.json grub.cfg"
"environment/os/linux/boot/generate_grub_config.py boot-params.json grub.cfg"
],

"upload": [
Expand All @@ -44,9 +48,10 @@
"name": "Apply boot parameters to a remote Ubuntu VM",
"class": "mlos_bench.environments.RemoteEnv",

"config": {
"include_tunables": ["environments/os/linux/boot/linux-boot-tunables.jsonc"],

"tunable_params": ["boot"],
"config": {
"tunable_params": ["linux-kernel-boot"],

"required_args": [
"storageAccountName",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"linux-kernel-boot": {
bpkroth marked this conversation as resolved.
Show resolved Hide resolved
"cost": 300,
// See Also: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
// NOTE: This is an incomplete list.
"params": {
"align_va_addr": {
"type": "categorical",
"default": "on",
"values": ["on", "off"]
},
"idle": {
"type": "categorical",
"default": "halt",
"values": ["halt", "poll", "nomwait"]
},
"ima.ahash_bufsize": {
"type": "int",
"default": 4096,
"range": [0, 65536]
},
"noautogroup": {
"type": "categorical",
"default": null,
"values": [null, "noautogroup"]
},
"nohugevmalloc": {
"type": "categorical",
"default": null,
"values": [null, "nohugevmalloc"]
},
"nohalt": {
"type": "categorical",
"default": null,
"values": [null, "nohalt"]
},
"nohz": {
"type": "categorical",
"default": null,
"values": [null, "nohz"]
},
"no-kvmapf": {
"type": "categorical",
"default": null,
"values": [null, "no-kvmapf"]
},
"nopvspin": {
"type": "categorical",
"default": null,
"values": [null, "nopvspin"]
}
}
}
}
File renamed without changes.
Loading