Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

NAS Benchmark #2578

Merged
merged 42 commits into from
Jun 29, 2020
Merged

NAS Benchmark #2578

merged 42 commits into from
Jun 29, 2020

Conversation

ultmaster
Copy link
Contributor

@ultmaster ultmaster commented Jun 18, 2020

  • Add NAS-Bench-201
  • Add NAS-Bench-101
  • NDS
  • Test end-to-end installation script
  • Test API
  • Documentation

### Preparation

```bash
docker run -e NNI_VERSION=${NNI_VERSION} -v ${HOME}/.nni/nasbenchmark:/outputs .:/root tensorflow/tensorflow:1.15.2-py3 /bin/bash /root/nasbench101.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there docker image in this command?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker image is tensorflow/tensorflow:1.15.2-py3


Please replace `${NNI_VERSION}` with any NNI version, for example, v1.6 or master.

It takes about 70 minutes to dump the records and build index. Output size is about 1.9GB.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how can I store the generated dataset out of docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mount a folder into /outputs in docker, and everything in that folder will be persisted.


It takes about 70 minutes to dump the records and build index. Output size is about 1.9GB.

### API Documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please complete this part

return matrix


def nasbench_format_to_architecture_repr(adjacency_matrix, labeling):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add docstring

@@ -0,0 +1,2 @@
from .model import Nb201ComputedStats, Nb201IntermediateStats, Nb201RunConfig
from .shortcuts import query_nb201_computed_stats
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the meaning of shortcuts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the practice from some other projects. Do you have a better name in your mind?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query.py

@ultmaster ultmaster marked this pull request as ready for review June 27, 2020 04:38
@@ -23,4 +23,5 @@ For details, please refer to the following tutorials:
One-shot NAS <NAS/one_shot_nas>
Customize a NAS Algorithm <NAS/Advanced>
NAS Visualization <NAS/Visualization>
NAS Benchmark <NAS/Benchmark>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark -> Benchmarks

from .graph_util import hash_module, infer_num_vertices


def query_nb101_computed_stats(arch, num_epochs, isomorphism=True, reduction=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "computed_stats" a common terminology?

enumerate from 0. Since node 0 is input node, it is skipped in this dict. Each ``op``
is one of :const:`nni.nas.benchmark.nasbench101.CONV3X3_BN_RELU`,
:const:`nni.nas.benchmark.nasbench101.CONV1X1_BN_RELU`, and :const:`nni.nas.benchmark.nasbench101.MAXPOOL3X3`.
Each ``input`` is a list of previous nodes. For example ``input5`` can be ``[0, 1, 3]``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you give a complete example of arch? it is fine to have only several nodes

@ultmaster ultmaster merged commit b91aba3 into microsoft:master Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants