Skip to main content

Neural Pipeline Search (NePS)

PyPI version Python versions License Tests

Welcome to NePS, a powerful and flexible Python library for hyperparameter optimization (HPO) and neural architecture search (NAS) that makes HPO and NAS practical for deep learners.

NePS houses recently published and also well-established algorithms that can all be run massively parallel on distributed setups and, in general, NePS is tailored to the needs of deep learning experts.

To learn about NePS, check-out the documentation, our examples, or a colab tutorial.

Key Features

In addition to the features offered by traditional HPO and NAS libraries, NePS stands out with:

  1. Hyperparameter Optimization (HPO) Efficient Enough for Deep Learning:
    NePS excels in efficiently tuning hyperparameters using algorithms that enable users to make use of their prior knowledge, while also using many other efficiency boosters.
  2. Neural Architecture Search (NAS) with Expressive Search Spaces:
    NePS provides capabilities for optimizing DL architectures in an expressive and natural fashion.
  3. Zero-effort Parallelization and an Experience Tailored to DL:
    NePS simplifies the process of parallelizing optimization tasks both on individual computers and in distributed computing environments. As NePS is made for deep learners, all technical choices are made with DL in mind and common DL tools such as Tensorboard are embraced.

Installation

To install the latest release from PyPI run

pip install neural-pipeline-search

Basic Usage

Using neps always follows the same pattern:

  1. Define a evaluate_pipeline function capable of evaluating different architectural and/or hyperparameter configurations for your problem.
  2. Define a pipeline_space of those Parameters
  3. Call neps.run(evaluate_pipeline, pipeline_space)

In code, the usage pattern can look like this:

import neps
import logging

logging.basicConfig(level=logging.INFO)

# 1. Define a function that accepts hyperparameters and computes the validation error
def evaluate_pipeline(lr: float, alpha: int, optimizer: str):
    # Create your model
    model = MyModel(lr=lr, alpha=alpha, optimizer=optimizer)

    # Train and evaluate the model with your training pipeline
    validation_error = train_and_eval(model)
    return validation_error


# 2. Define a search space of parameters; use the same parameter names as in evaluate_pipeline
class ExampleSpace(neps.PipelineSpace):
    lr = neps.Float(
        lower=1e-5,
        upper=1e-1,
        log=True,   # Log spaces
        log_base=10, # Logarithm base, by default it's natural log
        prior=1e-3, # Incorporate your knowledge to help optimization
    )
    alpha = neps.Integer(lower=1, upper=42)
    optimizer = neps.Categorical(choices=["sgd", "adam"])

# 3. Run the NePS optimization
neps.run(
    evaluate_pipeline=evaluate_pipeline,
    pipeline_space=ExampleSpace(),
    root_directory="path/to/save/results",  # Replace with the actual path.
    evaluations_to_spend=100,
)

Examples

Discover how NePS works through these examples:

Contributing

Please see the documentation for contributors.

Citations

For pointers on citing the NePS package and papers refer to our documentation on citations.

Metadata

Release files for neural-pipeline-search 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neural-pipeline-search 0.16.0
File Size Uploaded
neural_pipeline_search-0.16.0.tar.gz 217.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neural-pipeline-search 0.16.0
File Interpreter ABI Platform
neural_pipeline_search-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 461.3 kB

Release files / neural_pipeline_search-0.16.0.tar.gz

Download URL neural_pipeline_search-0.16.0.tar.gz
Size 217.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0581de85593ed56da3eb586efdd7929234f7d4859b8a1cd6485b611d2484dd02
BLAKE2b-256 checksum
How to use checksums
7f9f9d3003644f5576007258d18f3a273a9d49f4dfbf6ad107d4a1727105e53a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release files / neural_pipeline_search-0.16.0-py3-none-any.whl

Download URL neural_pipeline_search-0.16.0-py3-none-any.whl
Size 243.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
299f6357291c3cdd164ab4b51dff1e285eb88e91c0d2a7e1b107312be3e08e55
BLAKE2b-256 checksum
How to use checksums
edd49e6eee5713e6af0a432c7000911f02af4169625a68af2775d524fc651f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.3

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.11.1

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page