Metadata-Version: 2.1
Name: mlos-core
Version: 0.6.2
Summary: MLOS Core Python interface for parameter optimization.
Author-email: Microsoft <mlos-maintainers@service.microsoft.com>
Maintainer-email: Microsoft <mlos-maintainers@service.microsoft.com>
License: MIT
Project-URL: Documentation, https://microsoft.github.io/MLOS/source_tree_docs/mlos_core/
Project-URL: Repository, https://github.com/microsoft/MLOS/
Project-URL: Issues, https://github.com/microsoft/MLOS/issues
Project-URL: Package Source, https://github.com/microsoft/MLOS/tree/main/mlos_core/
Keywords: autotuning,optimization
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: scikit-learn>=1.3
Requires-Dist: scipy>=1.3.2
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.2.0; python_version >= "3.9"
Requires-Dist: ConfigSpace>=1.0
Provides-Extra: flaml
Requires-Dist: flaml<2.2.0; extra == "flaml"
Requires-Dist: flaml[blendsearch]; extra == "flaml"
Provides-Extra: smac
Requires-Dist: smac>=2.2.0; extra == "smac"
Provides-Extra: full
Requires-Dist: smac>=2.2.0; extra == "full"
Requires-Dist: flaml<2.2.0; extra == "full"
Requires-Dist: flaml[blendsearch]; extra == "full"
Provides-Extra: full-tests
Requires-Dist: smac>=2.2.0; extra == "full-tests"
Requires-Dist: flaml<2.2.0; extra == "full-tests"
Requires-Dist: flaml[blendsearch]; extra == "full-tests"
Requires-Dist: pytest; extra == "full-tests"
Requires-Dist: pytest-forked; extra == "full-tests"
Requires-Dist: pytest-xdist; extra == "full-tests"
Requires-Dist: pytest-cov; extra == "full-tests"
Requires-Dist: pytest-local-badge; extra == "full-tests"

# mlos-core

This [directory](https://github.com/microsoft/MLOS/tree/main/mlos_core/./) contains the code for the `mlos-core` optimizer package.

It's available for `pip install` via the pypi repository at [mlos-core](https://pypi.org/project/mlos-core/).

## Description

`mlos-core` is an optimizer package, wrapping other libraries like FLAML and SMAC to use techniques like Bayesian optimization and others to identify & sample tunable configuration parameters and propose optimal parameter values with a consistent API: `suggest` and `register`.

These can be evaluated by [`mlos-bench`](https://github.com/microsoft/MLOS/tree/main/mlos_core/../mlos_bench/), generating and tracking experiment results (proposed parameters, benchmark results & telemetry) to update the optimization loop, or used independently.

## Features

Since the tunable parameter search space is often extremely large, `mlos-core` automates the following steps to efficiently generate optimal task-specific kernel and application configurations.

1. Reduce the search space by identifying a promising set of tunable parameters
    - Map out the configuration search space: Automatically track and manage the discovery of new Linux kernel parameters and their default values across versions.
    Filter out non-tunable parameters (e.g., not writable) and track which kernel parameters exist for a given kernel version.
    - Leverage parameter knowledge for optimization: Information on ranges, sampling intervals, parameter correlations, workload type sensitivities for tunable parameters are tracked and currently manually curated.
    In the future, this can be automatically maintained by scraping documentation pages on kernel parameters.
    - Tailored to application: Consider prior knowledge of the parameter's impact & an application's workload profile (e.g. network heavy, disk heavy, CPU bound, multi-threaded, latency sensitive, throughput oriented, etc.) to identify likely impactful candidates of tunable parameters, specific to a particular application.
2. Sampling to warm-start optimization in a high dimensional search space
3. Produce optimal configurations through Bayesian optimization
    - Support for various optimizer algorithms (default Bayesian optimizer, Flaml, SMAC, and random for baseline comparison), that handle multiple types of constraints.
    This includes cost-aware optimization, that considers experiment costs given current tunable parameters.
    - Integrated with `mlos-bench`, proposed configurations are logged and evaluated.

## See Also

- <https://microsoft.github.io/MLOS/autoapi/mlos_core/> for more documentation details
