Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bpkroth committed Nov 12, 2024
1 parent 9f10f62 commit 89ef731
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/source/mlos_bench.run.usage.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mlos_bench CLI usage
==================================
====================

Here is the current ``--help`` output for the ``mlos_bench`` CLI:

Expand Down
5 changes: 3 additions & 2 deletions mlos_bench/mlos_bench/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""mlos_bench is a framework to help automate benchmarking and OS/application
parameter autotuning and the data management of the results.
"""
mlos_bench is a framework to help automate benchmarking and OS/application parameter
autotuning and the data management of the results.
It can be installed from `pypi <https://pypi.org/project/mlos-bench>`_ via
``pip install mlos-bench`` and executed using the ``mlos_bench``
Expand Down
18 changes: 12 additions & 6 deletions mlos_bench/mlos_bench/config/schemas/config_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""A simple class for describing where to find different config schemas and validating
"""
A simple class for describing where to find different config schemas and validating
configs against them.
See Also
Expand Down Expand Up @@ -35,10 +36,11 @@
# NOTE: this may cause pytest to fail if it's expecting exceptions
# to be raised for invalid configs.
_VALIDATION_ENV_FLAG = "MLOS_BENCH_SKIP_SCHEMA_VALIDATION"
"""The special environment flag to set to skip schema validation.
"""
The special environment flag to set to skip schema validation.
Useful for local development when you're making a lot of changes to the config or
adding new classes that aren't in the main repo yet.
Useful for local development when you're making a lot of changes to the config or adding
new classes that aren't in the main repo yet.
"""

_SKIP_VALIDATION = environ.get(_VALIDATION_ENV_FLAG, "false").lower() in {
Expand Down Expand Up @@ -118,7 +120,9 @@ def registry(self) -> Registry:


SCHEMA_STORE = SchemaStore()
"""Static SchemaStore instance used for storing and retrieving schemas for config validation."""
"""Static SchemaStore instance used for storing and retrieving schemas for config
validation.
"""


class ConfigSchema(Enum):
Expand Down Expand Up @@ -149,7 +153,9 @@ class ConfigSchema(Enum):
"""Schema for :py:mod:`~mlos_bench.tunables.tunable_groups` configurations."""

TUNABLE_VALUES = path_join(CONFIG_SCHEMA_DIR, "tunables/tunable-values-schema.json")
"""Schema for :py:mod:`~mlos_bench.tunables.tunable_groups` values configurations."""
"""Schema for :py:mod:`~mlos_bench.tunables.tunable_groups` values
configurations.
"""

UNIFIED = path_join(CONFIG_SCHEMA_DIR, "mlos-bench-config-schema.json")
"""Global combined schema file (e.g., for ``*.mlos.json`` files)."""
Expand Down
5 changes: 3 additions & 2 deletions mlos_bench/mlos_bench/dict_templater.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""Simple class to help with nested dictionary ``$var`` templating in configuration
file expansions."""
"""Simple class to help with nested dictionary ``$var`` templating in configuration file
expansions.
"""

from copy import deepcopy
from string import Template
Expand Down

0 comments on commit 89ef731

Please sign in to comment.