Skip to content

Wuyxin/Falcon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FALCON: Efficient Automatic Machine Learning via Design Graphs

We provide implementations of Falcon on two popular platforms: GraphGym and NNI.

Quick location of Falcon implementations: graphgym.automl.algorithms.Falcon and nni.retiarii.strategy.FalconTrainer.

Environment Setup

Main Packages

  • torch 1.11.0
  • torch-cluster 1.6.0
  • torch-geometric 2.0.4
  • torch-scatter 2.0.9
  • torch-sparse 0.6.14
  • torch-spline-conv 1.2.1

Installing cmds (for CUDA version=11.3)

conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=11.3 -c pytorch
conda install pyg -c pyg
pip install -r requirements.txt

Graph Tasks

We follow GraphGym to construct our code. The details of GraphGym can be found in the original repo, while we also provide a short introduction here.

To run the graph tasks in our paper, go to the graphgym directory via cd graphgym.

(a) Define search space and base design

Please follow the format in run/grids/example.txt to create a flexible design space! The search spaces used in the paper are defined in run/grids/node_general.txt (for node classification except for Reddit) and run/grids/node.txt (for Reddit), and /run/grids/graph.txt (for graph classifications).

Also, a base design is required for our code to generate design candidates. Various examples are provided in run/configs/.

After the search space and the base design are prepared, the candidate designs will be generated by automl/space/grid.py.

(b) Define a search configuration

A search configuration generally requires a search space, selection metric, and training epoch (for the designs' optimization). Examples are provided in run/configs_nas/.

(c) Select search algorithm

We realize a set of AutoGL methods in automl/algorithms, including Bayesian Optimization, DARTS, ENAS, and Falcon. The names of the available search algorithms are defined in algorithm_dict in automl/algorithms/__init__.py. We run the experiments of AutoAttend and GASSO in their original repos, and we are hoping to integrate them into our repository. Keep tuned!

(d) Start searching!

Finally, we can simply run the cmds to run [algorithm] on a search configuration defined in [nas_cfg_file]:

python -m run.main_automl --cfg [nas_cfg_file] --algo [algorithm]

For example, for the ogbn-arxiv node classification task in our paper, run

python -m run.main_automl --cfg run/configs_nas/arxiv.yaml --algo falcon

Image Task

To run the image task in our paper, go to the nni directory. Similar to graph tasks, searching for the best designs on an image task requires the three components

(a) Search space

We use nni.LayerChoice module to define the search space on top of a base design. Thus users don't have to define the base design separately. For hyper-parameters, simply define the space in a dict format, e.g., {design_variable: [candidate values]}.

(b) Searching for designs

The files necessary for running the experiments are included in run/. To run falcon on CIFAR-10 dataset:

python -m main_hypo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published