Metadata-Version: 2.1
Name: neural-pipeline-search
Version: 0.6.1
Summary: Neural Pipeline Search helps deep learning experts find the best neural pipeline.
Home-page: https://github.com/automl/neps
License: MIT
Keywords: Neural Pipeline Search,Neural Architecture Search,Hyperparameter Optimization,AutoML
Author: Danny Stoll
Author-email: stolld@cs.uni-freiburg.de
Requires-Python: >=3.7.1,<3.11
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Distributed Computing
Requires-Dist: ConfigSpace (>=0.4.19,<0.5.0)
Requires-Dist: grakel (>=0.1.9,<0.2.0)
Requires-Dist: matplotlib (>=3.4,<4.0)
Requires-Dist: metahyper (>=0.5.3,<0.6.0)
Requires-Dist: networkx (>=2.6.3,<3.0.0)
Requires-Dist: nltk (>=3.6.4,<4.0.0)
Requires-Dist: numpy (>=1.21.0,<2.0.0); python_version < "3.8"
Requires-Dist: numpy (>=1.22.0,<2.0.0); python_version >= "3.8"
Requires-Dist: pandas (>=1.3.1,<2.0.0)
Requires-Dist: path (>=16.2.0,<17.0.0)
Requires-Dist: scipy (>=1.7,<2.0)
Requires-Dist: statsmodels (>=0.13.2,<0.14.0)
Requires-Dist: termcolor (>=1.1.0,<2.0.0)
Requires-Dist: torch (>=1.7.0)
Requires-Dist: types-termcolor (>=1.1.2,<2.0.0)
Requires-Dist: typing-extensions (>=4.0.1,<5.0.0)
Project-URL: Documentation, https://automl.github.io/neps/
Project-URL: Repository, https://github.com/automl/neps
Description-Content-Type: text/markdown

# Neural Pipeline Search (NePS)

[![PyPI version](https://img.shields.io/pypi/v/neural-pipeline-search?color=informational)](https://pypi.org/project/neural-pipeline-search/)
[![Python versions](https://img.shields.io/pypi/pyversions/neural-pipeline-search)](https://pypi.org/project/neural-pipeline-search/)
[![License](https://img.shields.io/pypi/l/neural-pipeline-search?color=informational)](LICENSE)
[![Tests](https://github.com/automl/neps/actions/workflows/tests.yaml/badge.svg)](https://github.com/automl/neps/actions)

NePS helps deep learning experts find the best neural pipeline with

- Hyperparameter Optimization (HPO) ([example](neps_examples/basic_usage/hyperparameters.py))
- (Hierarchical) Neural Architecture Search (NAS) ([example](neps_examples/basic_usage/hierarchical_architecture.py))
- Joint Architecture and Hyperparameter Search (JAHS) ([example](neps_examples/basic_usage/architecture_and_hyperparameters.py), [paper](https://openreview.net/forum?id=_HLcjaVlqJ))

For efficiency and convenience NePS allows you to

- Input expert intuition to speed-up HPO, NAS, or JAHS ([examples](neps_examples/expert_priors), [paper](https://openreview.net/forum?id=MMAeCXIa89))
- Asynchronously parallelize without code changes ([documentation](https://automl.github.io/neps/latest/parallelization/))

## Note

As indicated with the `v0.x.x` version number, NePS is early stage code and APIs might change in the future.

## Documentation

Please have a look at our [documentation](https://automl.github.io/neps/latest/) and [examples](neps_examples).

## Installation

Using pip

```bash
pip install neural-pipeline-search
```

## Usage

Using `neps` always follows the same pattern:

1. Define a `run_pipeline` function that evaluates architectures/hyperparameters for your problem
1. Define a search space `pipeline_space` of architectures/hyperparameters
1. Call `neps.run` to optimize `run_pipeline` over `pipeline_space`

In code, the usage pattern can look like this:

```python
import neps
import logging

# 1. Define a function that accepts hyperparameters and computes the validation error
def run_pipeline(hyperparameter_a: float, hyperparameter_b: int):
    validation_error = -hyperparameter_a * hyperparameter_b
    return validation_error


# 2. Define a search space of hyperparameters; use the same names as in run_pipeline
pipeline_space = dict(
    hyperparameter_a=neps.FloatParameter(lower=0, upper=1),
    hyperparameter_b=neps.IntegerParameter(lower=1, upper=100),
)

# 3. Call neps.run to optimize run_pipeline over pipeline_space
logging.basicConfig(level=logging.INFO)
neps.run(
    run_pipeline=run_pipeline,
    pipeline_space=pipeline_space,
    root_directory="usage_example",
    max_evaluations_total=5,
)
```

For more details and features please have a look at our [documentation](https://automl.github.io/neps/latest/) and [examples](neps_examples).

## Analysing runs

See our [documentation on analysing runs](https://automl.github.io/neps/latest/analyse).

## Alternatives

NePS does not cover your use-case? Have a look at [some alternatives](https://automl.github.io/neps/latest/alternatives).

## Contributing

Please see the [documentation for contributors](https://automl.github.io/neps/latest/contributing/).

