/NASLib

NASLib is a Neural Architecture Search (NAS) library for facilitating NAS research for the community by providing interfaces to several state-of-the-art NAS search spaces and optimizers.

Primary LanguagePythonApache License 2.0Apache-2.0

NASLib

Build Status codecov

NASLib is a Neural Architecture Search (NAS) library. Its purpose is to facilitate NAS research for the community by providing interfaces to several state-of-the-art NAS search spaces

⚠️ This library is under construction and there is no official release yet. Feel free to play around and have a look but be aware that the APIs will be changed until we have a first release.

It is designed to be modular, extensible and easy to use.

naslib-overview

Usage

search_space = SimpleCellSearchSpace()

optimizer = DARTSOptimizer(config)
optimizer.adapt_search_space(search_space)

trainer = Trainer(optimizer, config)
trainer.search()        # Search for an architecture
trainer.evaluate()      # Evaluate the best architecture

For an example file see demo.py.

For more extensive documentation see docs.

Requirements

Make sure you use the latest version of pip. It makes sense to set up a virtual environment, too.

python3 -m venv naslib
source naslib/bin/activate

pip install --upgrade pip setuptools wheel
pip install cython

Installation

Clone and install.

If you plan to modify naslib consider adding the -e option for pip install.

git clone ...
cd naslib
pip install .

To validate the installation, you can run tests:

cd tests
coverage run -m unittest discover

The test coverage can be seen with coverage report.

Cite

If you use this code in your own work, please cite NASLib using the following bibtex entry:

@misc{naslib-2020, 
  title={NASLib: A Modular and Flexible Neural Architecture Search Library}, 
  author={Ruchte, Michael and Zela, Arber and Siems, Julien and Grabocka, Josif and Hutter, Frank}, 
  year={2020}, publisher={GitHub}, 
  howpublished={\url{https://github.com/automl/NASLib}} }