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

Introduce basic experiment visualization module mlos_viz via dabl #624

Merged
merged 71 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
5d14112
initial mlos_viz module wrapper for dabl
bpkroth Jan 5, 2024
8d9a802
minor fixups
bpkroth Jan 5, 2024
7447865
Merge branch 'main' into initial-mlos-viz-with-dabl
bpkroth Jan 9, 2024
1cdbfb3
Merge branch 'main' into initial-mlos-viz-with-dabl
bpkroth Jan 9, 2024
f1e55d6
update to new setup.py format
bpkroth Jan 9, 2024
3ab13ea
add objective info to storage schema
bpkroth Jan 10, 2024
0dd8499
Add support for storing the optimization target and direction of an e…
bpkroth Jan 10, 2024
7c0b9fb
fixup version
bpkroth Jan 10, 2024
fdcc3e3
Add support for storing the optimization target and direction of an e…
bpkroth Jan 10, 2024
e5dcf14
Rename and improve tunable vs config API and documentation
bpkroth Jan 11, 2024
8817b33
comments
bpkroth Jan 11, 2024
34a7101
actually do the insert, and add some todo comments
bpkroth Jan 11, 2024
6e96d15
data checking
bpkroth Jan 11, 2024
19ffb06
todo comments
bpkroth Jan 11, 2024
cef890e
wip: add a fallback
bpkroth Jan 11, 2024
cf69674
Rename and improve tunable vs config API and documentation
bpkroth Jan 11, 2024
5cb4258
comments
bpkroth Jan 11, 2024
a0c21ca
data checking
bpkroth Jan 11, 2024
cfd3e4e
actually do the insert, and add some todo comments
bpkroth Jan 11, 2024
8f23b1d
consolidate logic
bpkroth Jan 11, 2024
022dddf
pylint
bpkroth Jan 11, 2024
7536d59
consolidate logic
bpkroth Jan 11, 2024
8548ebf
TODOs
bpkroth Jan 11, 2024
4e07799
fixups
bpkroth Jan 11, 2024
a2fd9a5
Merge branch 'main' into initial-mlos-viz-with-dabl
bpkroth Jan 11, 2024
b14e710
wip: add a fallback
bpkroth Jan 11, 2024
3498ff2
pylint
bpkroth Jan 11, 2024
4fdf957
TODOs
bpkroth Jan 11, 2024
eeea732
fixups
bpkroth Jan 11, 2024
c26ba06
Merge branch 'main' into store-and-expose-optimization-target-info
bpkroth Jan 11, 2024
6e49010
add objective info to storage schema
bpkroth Jan 10, 2024
687501f
todo comments
bpkroth Jan 11, 2024
aa9e545
stubs for tests
bpkroth Jan 11, 2024
814a0dd
fixup
bpkroth Jan 11, 2024
1c7c3dd
Merge branch 'store-and-expose-optimization-target-info' into initial…
bpkroth Jan 11, 2024
a2673da
move some attrs to the base class
bpkroth Jan 11, 2024
fdf64d2
fixups
bpkroth Jan 11, 2024
d77a806
basic test
bpkroth Jan 11, 2024
c15123b
add some more test handling
bpkroth Jan 11, 2024
5ffcd67
reorg
bpkroth Jan 11, 2024
b677aba
Merge branch 'store-and-expose-optimization-target-info' into initial…
bpkroth Jan 11, 2024
6f8f836
basic dabl plot implementation
bpkroth Jan 12, 2024
a10b001
work to integrate mlos_viz into the build system
bpkroth Jan 12, 2024
739e508
more build system integration
bpkroth Jan 12, 2024
44d1eea
add docs generation
bpkroth Jan 12, 2024
a548a56
fix static string references
bpkroth Jan 12, 2024
9a63147
stub in another default plot
bpkroth Jan 12, 2024
277915f
pylint
bpkroth Jan 12, 2024
3213ff0
pydocstyle
bpkroth Jan 12, 2024
37f325b
reference basic test stubs
bpkroth Jan 12, 2024
223bd56
reorg
bpkroth Jan 12, 2024
e5dce96
reorg
bpkroth Jan 12, 2024
1311dbb
fixups
bpkroth Jan 12, 2024
84c58ca
tweak
bpkroth Jan 12, 2024
6ec02ca
fixups
bpkroth Jan 12, 2024
3cb49fc
add optimizer behavior to default plots
bpkroth Jan 12, 2024
1ab67f0
tweaks
bpkroth Jan 12, 2024
600aadb
pylint
bpkroth Jan 13, 2024
f9d9923
fixups
bpkroth Jan 13, 2024
7eb9c0d
fixup
bpkroth Jan 13, 2024
67956d6
Bump version: 0.2.5 → 0.3.0
bpkroth Jan 13, 2024
d6ba89e
Update mlos_bench/mlos_bench/run.py
bpkroth Jan 16, 2024
8683aad
making opt_direction optional
bpkroth Jan 16, 2024
8d12b72
adding todo comments and stubbing out weighted multi-objective support
bpkroth Jan 16, 2024
bd5a2a6
Merge branch 'main' into store-and-expose-optimization-target-info
bpkroth Jan 16, 2024
667119a
make optimization direction non-nullable
bpkroth Jan 16, 2024
d4d8f50
Update mlos_bench/mlos_bench/storage/base_experiment_data.py
bpkroth Jan 16, 2024
7b67780
Merge branch 'store-and-expose-optimization-target-info' into initial…
bpkroth Jan 16, 2024
b73e82d
add a workspace config for vscode
bpkroth Jan 16, 2024
7db9af4
Merge branch 'main' into initial-mlos-viz-with-dabl
bpkroth Jan 16, 2024
4090bb0
updated readme
bpkroth Jan 16, 2024
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.6
current_version = 0.3.0
commit = True
tag = True

Expand Down
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"conda",
"configspace",
"coro",
"dabl",
"DABL",
"dataframe",
"devcontainer",
"discretization",
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/scripts/common/prep-deps-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ get_python_deps() {
python3 /tmp/conda-tmp/$pkg/setup.py egg_info --egg-base "$tmpdir/"
cat "$tmpdir/$pkg.egg-info/requires.txt" \
| grep -v -e '^\[' -e '^\s*$' \
| grep -v '^mlos-core' \
| grep -v '^mlos-' \
| sort -u \
> /tmp/conda-tmp/$pkg.requirements.txt
}
for pkg in mlos_core mlos_bench; do
for pkg in mlos_core mlos_bench mlos_viz; do
get_python_deps "$pkg"
done
rm -rf "$tmpdir"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/scripts/prep-container-build
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ -d .devcontainer/tmp ]; then
fi
mkdir -p .devcontainer/tmp/
cp -v conda-envs/mlos.yml .devcontainer/tmp/mlos.yml
for pkg in mlos_core mlos_bench; do
for pkg in mlos_core mlos_bench mlos_viz; do
mkdir -p .devcontainer/tmp/$pkg
cp -v $pkg/setup.py .devcontainer/tmp/$pkg/setup.py
cp -v $pkg/_version.py .devcontainer/tmp/$pkg/_version.py
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/scripts/prep-container-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (Test-Path .devcontainer/tmp) {
New-Item -Type Directory .devcontainer/tmp

Copy-Item conda-envs/mlos.yml .devcontainer/tmp/mlos.yml
foreach ($pkg in @('mlos_core', 'mlos_bench')) {
foreach ($pkg in @('mlos_core', 'mlos_bench', 'mlos_viz')) {
New-Item -Type Directory ".devcontainer/tmp/${pkg}"
Copy-Item "$pkg/setup.py" ".devcontainer/tmp/${pkg}/setup.py"
Copy-Item "$pkg/_version.py" ".devcontainer/tmp/${pkg}/_version.py"
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/scripts/run-markdown-link-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker run -i --rm \
-v "$reporoot":/src:ro \
--workdir /src \
markdown-link-check:latest \
find ./doc ./mlos_core ./mlos_bench ./.devcontainer -name '*.md' -not -path './node_modules/*' \
find ./doc ./mlos_core ./mlos_bench ./mlos_viz ./.devcontainer -name '*.md' -not -path './node_modules/*' \
-exec markdown-link-check '{}' --config ./.github/workflows/markdown-link-check-config.json -q -v ';'

docker run -i --rm \
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ updates:
directory: "/mlos_bench/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/mlos_viz/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/doc/"
schedule:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build-dist-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ if (!($mlos_bench_whl)) {
exit 1
}

# Build the mlos_viz wheel.
Set-Location mlos_viz
if (Test-Path dist) {
Remove-Item -Recurse -Force dist
}
conda run -n $env:CONDA_ENV_NAME python setup.py bdist_wheel
Set-Location ..
$mlos_viz_whl = (Resolve-Path mlos_viz/dist/mlos_viz-*-py3-none-any.whl | Select-Object -ExpandProperty Path)
Write-Host "mlos_viz_whl: $mlos_viz_whl"
if (!($mlos_viz_whl)) {
Write-Error "Failed to find mlos_viz wheel."
exit 1
}

# Setup a clean environment to test installing/using them.
$PythonVersReq = (conda list -n $env:CONDA_ENV_NAME | Select-String -AllMatches -Pattern '^python\s+([0-9]+\.[0-9]+)[0-9.]*\s+').Matches.Groups[1].Value
#$PythonVersReq = conda run -n $env:CONDA_ENV_NAME python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
Expand Down Expand Up @@ -77,6 +91,12 @@ if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to install mlos_bench wheels."
exit $LASTEXITCODE
}
# Install mlos_viz wheel.
conda run -n mlos-dist-test pip install "${mlos_viz_whl}[full-tests]"
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to install mlos_viz wheels."
exit $LASTEXITCODE
}

# Just pick one simple test to run for now.
# The rest should have been handled in a separate step.
Expand All @@ -92,3 +112,10 @@ if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to run mlos_bench tests."
exit $LASTEXITCODE
}

# Run a simple mlos_viz test.
conda run -n mlos-dist-test python -m pytest mlos_viz/mlos_viz/tests/test_dabl_plot.py
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to run mlos_viz tests."
exit $LASTEXITCODE
}
12 changes: 6 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,21 @@ jobs:
with:
#path: ${{ env.CONDA_DIR }}/envs/${{ env.CONDA_ENV_NAME }}
path: ${{ env.CONDA_DIR }}/pkgs
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
restore-keys: |
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}

- name: Restore cached pip packages
id: restore-pip-cache
if: ${{ github.event_name != 'schedule' }}
uses: actions/cache@v3
with:
path: ${{ env.PIP_CACHE_DIR }}
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
restore-keys: |
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_NAME }}.yml') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}

- name: Log some environment variables for debugging
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ jobs:
with:
use-quiet-mode: yes
use-verbose-mode: yes
folder-path: './doc, ./mlos_core, ./mlos_bench, ./.devcontainer'
folder-path: './doc, ./mlos_core, ./mlos_bench, ./mlos_viz, ./.devcontainer'
file-path: './CODE_OF_CONDUCT.md, ./CONTRIBUTING.md, ./README.md, ./SECURITY.md'
config-file: './.github/workflows/markdown-link-check-config.json'
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs/mlos
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
key: conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_cur_hour }}
restore-keys: |
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_core/setup.py') }}-${{ hashFiles('mlos_bench/setup.py') }}-${{ env.cache_cur_date }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}-${{ env.cache_prev_hour }}
conda-${{ runner.os }}-${{ env.CONDA_ENV_NAME }}-${{ hashFiles('conda-envs/${{ env.CONDA_ENV_YML }}') }}-${{ hashFiles('mlos_*/setup.py') }}-${{ env.cache_cur_date }}

- name: Log some environment variables for debugging
run: |
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
# Only run the coverage checks on the devcontainer job.
- name: Run tests
run: |
conda run -n $env:CONDA_ENV_NAME pytest --junitxml=junit/test-results.xml mlos_core/ mlos_bench/
conda run -n $env:CONDA_ENV_NAME pytest --junitxml=junit/test-results.xml mlos_core/ mlos_bench/ mlos_viz/

# Note: unlike the Makefile version, the pwsh version of these rules are all run within a single shell context, so we can
# split commands across lines with CWD maintained (hence we also require the "cd .." here).
Expand Down
Loading
Loading