Open bkj opened 5 years ago
We implemented a wrapper that combines nasbench with the ConfigSpace package, which provides an efficient function to compute the neighborhood of an architecture encoded as a Configuration object. It is for example also used in SMAC for the local search of the acquisition function.
The following example demonstrates how you can get all neighbors of a random configuration:
from tabular_benchmarks import NASCifar10A
from ConfigSpace.util import get_one_exchange_neighbourhood
b = NASCifar10A(PATH_TO_NASBENCH)
cs = b.get_configuration_space()
config = cs.sample_configuration()
for n in get_one_exchange_neighbourhood(config, 42):
print(n)
Is there code somewhere here that takes an architecture and returns all of it's neighbors? Eg, the architectures that can be generated by adding/removing one edge or changing the op at one node?
Something like
Thanks!