Skip to content
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0678f96
Accept the terms of service for conda repos
bpkroth Jul 17, 2025
a3a82f7
Make conda output easier for debugging
bpkroth Jul 17, 2025
fcbfc49
more output adjustments
bpkroth Jul 17, 2025
c666915
Revert "more output adjustments"
bpkroth Jul 17, 2025
2dcfa42
Revert "Make conda output easier for debugging"
bpkroth Jul 17, 2025
9965602
try a suggestion
bpkroth Jul 17, 2025
57b673a
fixups
bpkroth Jul 17, 2025
2084a08
Merge branch 'main' into ci-fixups
bpkroth Jul 17, 2025
ecebe33
type fixups
bpkroth Sep 18, 2025
e7f524d
type checking fixups
bpkroth Sep 18, 2025
1b490ae
use conda by default
bpkroth Sep 18, 2025
9ad7794
small pyright fixups
bpkroth Sep 22, 2025
3c0aa23
Install pre-built pyrfr from conda to workaround build error.
bpkroth Sep 22, 2025
a8d9ccd
ignore a deprecation warning in matplotlib
bpkroth Sep 22, 2025
1862037
fixups
bpkroth Sep 22, 2025
b2530a3
ignore more warnings
bpkroth Sep 22, 2025
d914bcc
Avoid Debian trixie for now since there's no azure-cli package yet. …
bpkroth Sep 22, 2025
b6b5561
Moby has also been removed from Debian Trixie
bpkroth Sep 22, 2025
b059ac3
add more debug logging for missing docker support
bpkroth Sep 23, 2025
021f451
more debugging
bpkroth Sep 23, 2025
ac57951
comments
bpkroth Sep 23, 2025
4462cdf
fixup for local testing
bpkroth Sep 23, 2025
74d94cf
log docker missing warnings
bpkroth Sep 23, 2025
797ac40
comments and revert to moby
bpkroth Sep 23, 2025
72aec7b
upload the coverage.xml file regardless
bpkroth Sep 23, 2025
9fd6843
comments and port forwarding for doc viewing
bpkroth Sep 23, 2025
6fbd25b
revert
bpkroth Sep 23, 2025
382ab78
revertme: temporarily make docker required to see what the issue is i…
bpkroth Sep 23, 2025
496fba8
more debugging
bpkroth Sep 24, 2025
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
8 changes: 7 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

FROM mcr.microsoft.com/vscode/devcontainers/base AS base
# TODO: FIXME: Temporarily pin to bookworm until latest (trixie) base image is fully supported.
# See Also:
# - <https://github.com/microsoft/MLOS/issues/1002>
# - .devcontainer/devcontainer.json
FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm AS base

# Add some additional packages for the devcontainer terminal environment.
USER root
Expand Down Expand Up @@ -80,6 +84,8 @@ RUN echo "Setup miniconda" \
&& /opt/conda/bin/conda init \
&& /opt/conda/bin/conda config --set channel_priority strict \
&& /opt/conda/bin/conda info \
&& /opt/conda/bin/conda config --show \
&& /opt/conda/bin/conda tos accept --override-channels --channel defaults \
&& /opt/conda/bin/conda update -v -y -n base -c conda-forge -c defaults --all \
&& /opt/conda/bin/conda list -n base \
&& /opt/conda/bin/conda install -v -y -n base -c conda-forge -c defaults conda-libmamba-solver \
Expand Down
8 changes: 7 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {},
//"ghcr.io/devcontainers/features/conda:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
// Note: this may be required when moving to Debian Trixie base image.
// See Also:
// - <https://github.com/microsoft/MLOS/issues/1002>
// - .devcontainer/Dockerfile
//"moby": false
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/stuartleeks/dev-container-features/azure-cli-persistence:0": {},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/scripts/run-devcontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ docker run -it --rm \
--env http_proxy="${http_proxy:-}" \
--env https_proxy="${https_proxy:-}" \
--env no_proxy="${no_proxy:-}" \
--add-host host.docker.internal:host-gateway \
mlos-devcontainer \
$*
2 changes: 1 addition & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
echo "NO_CACHE=true" >> $GITHUB_ENV

- name: Run pytest with debug logging enabled for nightly runs
if: github.event_name == 'schedule'
#if: github.event_name == 'schedule'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable debug logging during all runs?

run: |
echo "PYTEST_EXTRA_OPTIONS=--log-level=DEBUG" >> $GITHUB_ENV

Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,7 @@
"githubPullRequests.experimental.chat": true,
"github.copilot.chat.codesearch.enabled": true,
"github.copilot.chat.copilotDebugCommand.enabled": true,
"github.copilot.chat.reviewSelection.enabled": true
"github.copilot.chat.reviewSelection.enabled": true,
"python-envs.defaultEnvManager": "ms-python.python:conda",
"python-envs.defaultPackageManager": "ms-python.python:conda"
}
3 changes: 3 additions & 0 deletions conda-envs/mlos-3.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ dependencies:
- python=3.10
# See comments in mlos.yml.
#- gcc_linux-64
# Install an SMAC requirement pre-compiled from conda-forge.
# See Also: https://github.com/microsoft/MLOS/issues/1001
- pyrfr>=0.9.0
- pip:
- bump2version
- check-jsonschema
Expand Down
3 changes: 3 additions & 0 deletions conda-envs/mlos-3.11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ dependencies:
- python=3.11
# See comments in mlos.yml.
#- gcc_linux-64
# Install an SMAC requirement pre-compiled from conda-forge.
# See Also: https://github.com/microsoft/MLOS/issues/1001
- pyrfr>=0.9.0
- pip:
- bump2version
- check-jsonschema
Expand Down
3 changes: 3 additions & 0 deletions conda-envs/mlos-3.12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ dependencies:
- python=3.12
# See comments in mlos.yml.
#- gcc_linux-64
# Install an SMAC requirement pre-compiled from conda-forge.
# See Also: https://github.com/microsoft/MLOS/issues/1001
- pyrfr>=0.9.0
- pip:
- bump2version
- check-jsonschema
Expand Down
3 changes: 3 additions & 0 deletions conda-envs/mlos-3.13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ dependencies:
- python=3.13
# See comments in mlos.yml.
#- gcc_linux-64
# Install an SMAC requirement pre-compiled from conda-forge.
# See Also: https://github.com/microsoft/MLOS/issues/1001
- pyrfr>=0.9.0
- pip:
- bump2version
- check-jsonschema
Expand Down
5 changes: 4 additions & 1 deletion conda-envs/mlos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ dependencies:
# FIXME: Temporarily avoid broken libpq that's missing client headers.
- libpq<17.0
- python
# Install an SMAC requirement pre-compiled from conda-forge.
# See Also: https://github.com/microsoft/MLOS/issues/1001
- pyrfr>=0.9.0
- pip:
- bump2version
- check-jsonschema
Expand All @@ -28,7 +31,7 @@ dependencies:
- pylint==3.3.7
- tomlkit
- mypy==1.15.0
- pyright==1.1.400
- pyright==1.1.405
- pandas-stubs
- types-beautifulsoup4
- types-colorama
Expand Down
2 changes: 1 addition & 1 deletion mlos_bench/mlos_bench/optimizers/mlos_core_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def bulk_register(

if status is not None:
# Select only the completed trials, set scores for failed trials to +inf.
df_status = pd.Series(status)
df_status = pd.Series(list(status), dtype=object)
# TODO: Be more flexible with values used for failed trials (not just +inf).
# Issue: https://github.com/microsoft/MLOS/issues/523
df_scores[df_status != Status.SUCCEEDED] = float("inf")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def _mysql_datetime(*, with_fsp: bool = False) -> mysql.DATETIME:
See <https://github.com/sqlalchemy/sqlalchemy/pull/12164> for details.
"""
if with_fsp:
return mysql.DATETIME(fsp=6) # type: ignore[no-untyped-call]
return mysql.DATETIME() # type: ignore[no-untyped-call]
return mysql.DATETIME(fsp=6)
return mysql.DATETIME()


def upgrade() -> None:
Expand Down
2 changes: 1 addition & 1 deletion mlos_bench/mlos_bench/storage/sql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _mysql_datetime_with_fsp() -> mysql.DATETIME:
Split out to allow single mypy ignore.
See <https://github.com/sqlalchemy/sqlalchemy/pull/12164> for details.
"""
return mysql.DATETIME(fsp=6) # type: ignore[no-untyped-call]
return mysql.DATETIME(fsp=6)


class _DDL:
Expand Down
12 changes: 8 additions & 4 deletions mlos_bench/mlos_bench/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import shutil
import socket
from datetime import tzinfo
from logging import debug, warning
from logging import warning
from subprocess import run

import pytest
Expand Down Expand Up @@ -52,8 +52,10 @@
if cmd.returncode != 0 or not any(
line for line in stdout.splitlines() if "Platform" in line and "linux" in line
):
debug("Docker is available but missing support for targeting linux platform.")
warning("Docker is available but missing buildx support for targeting linux platform.")
DOCKER = None
if not DOCKER:
warning("Docker is not available on this system. Some tests will be skipped.")
requires_docker = pytest.mark.skipif(
not DOCKER,
reason="Docker with Linux support is not available on this system.",
Expand All @@ -62,6 +64,8 @@
# A decorator for tests that require ssh.
# Use with @requires_ssh above a test_...() function.
SSH = shutil.which("ssh")
if not SSH:
warning("ssh is not available on this system. Some tests will be skipped.")
requires_ssh = pytest.mark.skipif(not SSH, reason="ssh is not available on this system.")

# A common seed to use to avoid tracking down race conditions and intermingling
Expand Down Expand Up @@ -112,7 +116,7 @@ def wait_docker_service_healthy(
docker_services: DockerServices,
project_name: str,
service_name: str,
timeout: float = 30.0,
timeout: float = 60.0,
) -> None:
"""Wait until a docker service is healthy."""
docker_services.wait_until_responsive(
Expand All @@ -126,7 +130,7 @@ def wait_docker_service_socket(docker_services: DockerServices, hostname: str, p
"""Wait until a docker service is ready."""
docker_services.wait_until_responsive(
check=lambda: check_socket(hostname, port),
timeout=30.0,
timeout=60.0,
pause=0.5,
)

Expand Down
2 changes: 2 additions & 0 deletions mlos_bench/mlos_bench/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def docker_compose_file(pytestconfig: pytest.Config) -> list[str]:
Path to the docker-compose file.
"""
_ = pytestconfig # unused
# TODO: move this closer to the necessary submodules so that different
# docker tests can run independently.
return [
os.path.join(os.path.dirname(__file__), "services", "remote", "ssh", "docker-compose.yml"),
os.path.join(os.path.dirname(__file__), "storage", "sql", "docker-compose.yml"),
Expand Down
9 changes: 8 additions & 1 deletion mlos_viz/mlos_viz/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _get_kwarg_defaults(target: Callable, **kwargs: Any) -> dict[str, Any]:
Note: this only works with non-positional kwargs (e.g., those after a * arg).
"""
target_kwargs = {}
for kword in target.__kwdefaults__: # or {} # intentionally omitted for now
for kword in target.__kwdefaults__ or {}:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type check fixup. I don't remember what the comment was about ...

if kword in kwargs:
target_kwargs[kword] = kwargs[kword]
return target_kwargs
Expand Down Expand Up @@ -59,6 +59,13 @@ def ignore_plotter_warnings() -> None:
),
)

warnings.filterwarnings(
"ignore",
module="matplotlib",
category=DeprecationWarning,
message="'mode' parameter is deprecated and will be removed in Pillow 13",
)


def _add_groupby_desc_column(
results_df: pandas.DataFrame,
Expand Down
7 changes: 7 additions & 0 deletions mlos_viz/mlos_viz/dabl.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,10 @@ def ignore_plotter_warnings() -> None:
module="dabl",
message="The legendHandles attribute was deprecated in Matplotlib 3.7 and will be removed",
)

warnings.filterwarnings(
"ignore",
module="matplotlib",
category=DeprecationWarning,
message="'mode' parameter is deprecated and will be removed in Pillow 13",
)
Loading