Skip to main content

A benchmark platform for Evolutionary Neural Architecture Search

Project description

The codes have been tested on Python 3.6 + pytorch 1.1 + torchvision 0.3.0 (pytorch 1.3 seems also ok, but not test thoroughly)

BenchENAS is a platform to help researchers conduct fair comparisons upon Evolutionary algorithm based Neural Architecture Search (ENAS) algorithms. BenchENAS currently has the following features (more are still in process, and welcome join us to contribute BenchENAS):

  • Nine representative state-of-the-art ENAS algorithms have been implemented into BenchENAS. They can be easily performed with customized benchmark datasets (including popular preprocessing techniques) and training algorithms (such as learning rate, optimizers, etc).

  • A GPU distributed training component is designed in BenchENAS to accelerate fitness evaluation. This component is specifically developed for common research environments where not many GPUs are specifically prepared.

  • BenchENAS is implemented by native Python with very few third-party libraries for easy installation. All components in BenchENAS can be easily configured with different data settings and different trainer settings.

  • BenchENAS is modular designed for easy extensibility. Researchers can easily implement their ENAS algorithms into BenchENAS, while directly using the implemented datasets, training algorithms (can also add their own datasets and training algorithms into BenchENAS), and distributed training components.

A research paper comprehensively introducing BenchENAS is available at: https://ieeexplore.ieee.org/document/9697075.

Requirements:

Center Computer:

  • redis (ubuntu software, start using the command redis-server --protected-mode on)
  • sshpass (python lib)
  • paramiko (python lib)

Conter Computer & workers:

  • multiprocess (python lib)
  • redis (python lib)

Running

Here's a quick run down of the main steps of running BenchENAS. For more details see our Documentation and Example.

  1. Start the redis-server on the center computer
$ ./redis-server   redis.conf
  1. Initialize configuration of the algorithm and training parameters
alg_list = {'algorithm': 'aecnn', 'max_gen': 20, 'pop_size': 20,
            'log_server': 'xx.xx.xx.xx', 'log_server_port': 6379,
            'exe_path': '/home/xxx/anaconda3/bin/python3'}

# dataset_list = ['MNIST', 'CIFAR10', 'CIFAR100']
# if dataset not in dataset_list, load customized dataset(data_dir)
train_list = {'dataset': 'CIFAR10', 'data_dir': '/home/xiaoyang/eye_dataset', 
              'img_input_size': [244, 244, 3],'optimizer': 'SGD', 'lr': 0.025,
              'batch_size': 64, 'total_epoch': 50, 'lr_strategy': 'ExponentialLR'}

gpu_info_list = {}
content = {'worker_ip': 'xx.xx.xx.xx', 'worker_name': 'cuda0', 'ssh_name': 'xxx',
           'ssh_password': '.123456', 'gpu': [1, 2]}
gpu_info_list['xx.xx.xx.xx'] = content
  1. Start the init_compute.py script to start the compute platform and detect free GPU devices
from benchenas import init_compute

init_compute.run(alg_list, train_list, gpu_info_list)
  1. Start the algorithm you would like to perform
from benchenas import main

main.run(alg_list, train_list, gpu_info_list)

How to use

  • Start the redis-server on the center computer (redis-server --protected-mode no)
  • Start the init_compute.py script to start the compute platform with parameter[run(alg_list, train_list, gpu_info_list)]
  • Start the algorithm you would like to perform with parameter[run(alg_list, train_list, gpu_info_list, search_space)] search_space default 'micro'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchENAS-1.2.0.tar.gz (146.5 kB view hashes)

Uploaded Source

Built Distribution

benchENAS-1.2.0-py3-none-any.whl (196.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page