"src/vscode:/vscode.git/clone" did not exist on "de99db23cfeadb0d3ae84c9c7a24ddeec703702a"
nas.sh 1.02 KB
Newer Older
Yuge Zhang's avatar
Yuge Zhang committed
1
2
3
4
5
6
7
8
#!/bin/bash
set -e
CWD=${PWD}

echo ""
echo "===========================Testing: NAS==========================="
EXAMPLE_DIR=${CWD}/../examples/nas

9
echo "testing nnictl ss_gen (classic nas)..."
Yuge Zhang's avatar
Yuge Zhang committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cd $EXAMPLE_DIR/classic_nas
SEARCH_SPACE_JSON=nni_auto_gen_search_space.json
if [ -f $SEARCH_SPACE_JSON ]; then
    rm $SEARCH_SPACE_JSON
fi
nnictl ss_gen -t "python3 mnist.py"
if [ ! -f $SEARCH_SPACE_JSON ]; then
    echo "Search space file not found!"
    exit 1
fi

echo "testing darts..."
cd $EXAMPLE_DIR/darts
python3 search.py --epochs 1 --channels 2 --layers 4
24
python3 retrain.py --arc-checkpoint ./checkpoint.json --layers 4 --epochs 1
Yuge Zhang's avatar
Yuge Zhang committed
25
26
27
28
29
30

echo "testing enas..."
cd $EXAMPLE_DIR/enas
python3 search.py --search-for macro --epochs 1
python3 search.py --search-for micro --epochs 1

chicm-ms's avatar
chicm-ms committed
31
32
33
34
#disabled for now
#echo "testing naive..."
#cd $EXAMPLE_DIR/naive
#python3 train.py
Yuge Zhang's avatar
Yuge Zhang committed
35
36
37
38

echo "testing pdarts..."
cd $EXAMPLE_DIR/pdarts
python3 search.py --epochs 1 --channels 4 --nodes 2 --log-frequency 10 --add_layers 0 --add_layers 1 --dropped_ops 3 --dropped_ops 3