This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eject docker usages in NAS benchmarks (#2645)
- Loading branch information
Showing
8 changed files
with
53 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
nasbench_full.tfrecord | ||
a.pth | ||
data.zip | ||
nds_data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tensorflow==1.15.2 | ||
tqdm | ||
peewee | ||
git+https://github.com/google-research/nasbench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
mkdir -p /outputs /tmp | ||
|
||
echo "Installing dependencies..." | ||
apt update && apt install -y wget git | ||
pip install --no-cache-dir tqdm peewee | ||
|
||
echo "Installing NNI..." | ||
cd /nni && echo "y" | source install.sh | ||
|
||
cd /tmp | ||
|
||
echo "Installing NASBench..." | ||
git clone https://github.com/google-research/nasbench | ||
cd nasbench && pip install -e . && cd .. | ||
if [ -z "${NASBENCHMARK_DIR}" ]; then | ||
NASBENCHMARK_DIR=~/.nni/nasbenchmark | ||
fi | ||
|
||
echo "Downloading NAS-Bench-101..." | ||
wget https://storage.googleapis.com/nasbench/nasbench_full.tfrecord | ||
if [ -f "nasbench_full.tfrecord" ]; then | ||
echo "nasbench_full.tfrecord found. Skip download." | ||
else | ||
wget https://storage.googleapis.com/nasbench/nasbench_full.tfrecord | ||
fi | ||
|
||
echo "Generating database..." | ||
rm -f /outputs/nasbench101.db /outputs/nasbench101.db-journal | ||
NASBENCHMARK_DIR=/outputs python -m nni.nas.benchmarks.nasbench101.db_gen nasbench_full.tfrecord | ||
rm -f ${NASBENCHMARK_DIR}/nasbench101.db ${NASBENCHMARK_DIR}/nasbench101.db-journal | ||
mkdir -p ${NASBENCHMARK_DIR} | ||
python -m nni.nas.benchmarks.nasbench101.db_gen nasbench_full.tfrecord | ||
rm -f nasbench_full.tfrecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gdown | ||
tqdm | ||
peewee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
mkdir -p /outputs /tmp | ||
|
||
echo "Installing dependencies..." | ||
apt update && apt install -y wget | ||
pip uninstall -y enum34 # https://github.com/iterative/dvc/issues/1995 | ||
pip install --no-cache-dir gdown tqdm peewee | ||
|
||
echo "Installing NNI..." | ||
cd /nni && echo "y" | source install.sh | ||
|
||
cd /tmp | ||
if [ -z "${NASBENCHMARK_DIR}" ]; then | ||
NASBENCHMARK_DIR=~/.nni/nasbenchmark | ||
fi | ||
|
||
echo "Downloading NAS-Bench-201..." | ||
gdown https://drive.google.com/uc\?id\=1OOfVPpt-lA4u2HJrXbgrRd42IbfvJMyE -O a.pth | ||
if [ -f "a.pth" ]; then | ||
echo "a.pth found. Skip download." | ||
else | ||
gdown https://drive.google.com/uc\?id\=1OOfVPpt-lA4u2HJrXbgrRd42IbfvJMyE -O a.pth | ||
fi | ||
|
||
echo "Generating database..." | ||
rm -f /outputs/nasbench201.db /outputs/nasbench201.db-journal | ||
NASBENCHMARK_DIR=/outputs python -m nni.nas.benchmarks.nasbench201.db_gen a.pth | ||
rm -f ${NASBENCHMARK_DIR}/nasbench201.db ${NASBENCHMARK_DIR}/nasbench201.db-journal | ||
mkdir -p ${NASBENCHMARK_DIR} | ||
python -m nni.nas.benchmarks.nasbench201.db_gen a.pth | ||
rm -f a.pth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tqdm | ||
peewee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
#!/bin/bash | ||
set -e | ||
mkdir -p /outputs /tmp | ||
|
||
echo "Installing dependencies..." | ||
apt update && apt install -y wget zip | ||
pip install --no-cache-dir tqdm peewee | ||
|
||
echo "Installing NNI..." | ||
cd /nni && echo "y" | source install.sh | ||
|
||
cd /tmp | ||
if [ -z "${NASBENCHMARK_DIR}" ]; then | ||
NASBENCHMARK_DIR=~/.nni/nasbenchmark | ||
fi | ||
|
||
echo "Downloading NDS..." | ||
wget https://dl.fbaipublicfiles.com/nds/data.zip -O data.zip | ||
if [ -f "data.zip" ]; then | ||
echo "data.zip found. Skip download." | ||
else | ||
wget https://dl.fbaipublicfiles.com/nds/data.zip -O data.zip | ||
fi | ||
unzip data.zip | ||
|
||
echo "Generating database..." | ||
rm -f /outputs/nds.db /outputs/nds.db-journal | ||
NASBENCHMARK_DIR=/outputs python -m nni.nas.benchmarks.nds.db_gen nds_data | ||
rm -f ${NASBENCHMARK_DIR}/nds.db ${NASBENCHMARK_DIR}/nds.db-journal | ||
mkdir -p ${NASBENCHMARK_DIR} | ||
python -m nni.nas.benchmarks.nds.db_gen nds_data | ||
rm -rf data.zip nds_data |