Beispiel #1
0
def get_tabular_bm_with_budget(benchmark: str):
    nas_full_path = f'{TABULAR_ROOT}'
    fcnet_path = f'{TABULAR_ROOT}/fcnet_tabular_benchmarks'

    if benchmark == "nas_cifar10a":
        min_budget = 12
        max_budget = 108
        b = NASCifar10A(data_dir=nas_full_path)

    elif benchmark == "nas_cifar10b":
        b = NASCifar10B(data_dir=nas_full_path)
        min_budget = 12
        max_budget = 108

    elif benchmark == "nas_cifar10c":
        b = NASCifar10C(data_dir=nas_full_path)
        min_budget = 12
        max_budget = 108

    elif benchmark == "protein_structure":
        b = FCNetProteinStructureBenchmark(data_dir=fcnet_path)
        min_budget = 3
        max_budget = 100

    elif benchmark == "slice_localization":
        b = FCNetSliceLocalizationBenchmark(data_dir=fcnet_path)
        min_budget = 3
        max_budget = 100

    elif benchmark == "naval_propulsion":
        b = FCNetNavalPropulsionBenchmark(data_dir=fcnet_path)
        min_budget = 3
        max_budget = 100

    elif benchmark == "parkinsons_telemonitoring":
        b = FCNetParkinsonsTelemonitoringBenchmark(data_dir=fcnet_path)
        min_budget = 3
        max_budget = 100
    else:
        raise ValueError(f'benchmark {benchmark} not recognized')

    return b, min_budget, max_budget
Beispiel #2
0
    from tabular_benchmarks import FCNetProteinStructureBenchmark, FCNetSliceLocalizationBenchmark,\
        FCNetNavalPropulsionBenchmark, FCNetParkinsonsTelemonitoringBenchmark
    from tabular_benchmarks import NASCifar10A, NASCifar10B, NASCifar10C
    data_dir = os.path.join(
        os.getcwd(), "../nas_benchmarks-development/"
        "tabular_benchmarks/fcnet_tabular_benchmarks/")

    if benchmark_type == "nas_cifar10a":  # NAS-Bench-101
        max_budget = 108
        b = NASCifar10A(data_dir=data_dir, multi_fidelity=True)
    elif benchmark_type == "nas_cifar10b":  # NAS-Bench-101
        max_budget = 108
        b = NASCifar10B(data_dir=data_dir, multi_fidelity=True)
    elif benchmark_type == "nas_cifar10c":  # NAS-Bench-101
        max_budget = 108
        b = NASCifar10C(data_dir=data_dir, multi_fidelity=True)
    elif benchmark_type == "protein_structure":  # NAS-HPO-Bench
        max_budget = 100
        b = FCNetProteinStructureBenchmark(data_dir=data_dir)
    elif benchmark_type == "slice_localization":  # NAS-HPO-Bench
        max_budget = 100
        b = FCNetSliceLocalizationBenchmark(data_dir=data_dir)
    elif benchmark_type == "naval_propulsion":  # NAS-HPO-Bench
        max_budget = 100
        b = FCNetNavalPropulsionBenchmark(data_dir=data_dir)
    else:  # benchmark_type == "parkinsons_telemonitoring": # NAS-HPO-Bench
        max_budget = 100
        b = FCNetParkinsonsTelemonitoringBenchmark(data_dir=data_dir)

    def f(config, budget=None):
        if budget is not None:
Beispiel #3
0
                    help='factor multiplied to the bandwidth')

args = parser.parse_args()

if args.benchmark == "nas_cifar10a":
    min_budget = 4
    max_budget = 108
    b = NASCifar10A(data_dir=args.data_dir)

elif args.benchmark == "nas_cifar10b":
    b = NASCifar10B(data_dir=args.data_dir)
    min_budget = 4
    max_budget = 108

elif args.benchmark == "nas_cifar10c":
    b = NASCifar10C(data_dir=args.data_dir)
    min_budget = 4
    max_budget = 108

elif args.benchmark == "protein_structure":
    b = FCNetProteinStructureBenchmark(data_dir=args.data_dir)
    min_budget = 3
    max_budget = 100

elif args.benchmark == "slice_localization":
    b = FCNetSliceLocalizationBenchmark(data_dir=args.data_dir)
    min_budget = 3
    max_budget = 100

elif args.benchmark == "naval_propulsion":
    b = FCNetNavalPropulsionBenchmark(data_dir=args.data_dir)
Beispiel #4
0
 from tabular_benchmarks import NASCifar10A, NASCifar10B, NASCifar10C
 data_dir = os.path.join(
     os.getcwd(), "../nas_benchmarks-development/"
     "tabular_benchmarks/fcnet_tabular_benchmarks/")
 if ssp == "nas_cifar10a":
     b = NASCifar10A(data_dir=data_dir, multi_fidelity=False)
     y_star_valid = b.y_star_valid
     y_star_test = b.y_star_test
     inc_config = None
 elif ssp == "nas_cifar10b":
     b = NASCifar10B(data_dir=data_dir, multi_fidelity=False)
     y_star_valid = b.y_star_valid
     y_star_test = b.y_star_test
     inc_config = None
 elif ssp == "nas_cifar10c":
     b = NASCifar10C(data_dir=data_dir, multi_fidelity=False)
     y_star_valid = b.y_star_valid
     y_star_test = b.y_star_test
     inc_config = None
 elif ssp == "protein_structure":
     b = FCNetProteinStructureBenchmark(data_dir=data_dir)
     inc_config, y_star_valid, y_star_test = b.get_best_configuration()
 elif ssp == "slice_localization":
     b = FCNetSliceLocalizationBenchmark(data_dir=data_dir)
     inc_config, y_star_valid, y_star_test = b.get_best_configuration()
 elif ssp == "naval_propulsion":
     b = FCNetNavalPropulsionBenchmark(data_dir=data_dir)
     inc_config, y_star_valid, y_star_test = b.get_best_configuration()
 elif ssp == "parkinsons_telemonitoring":
     b = FCNetParkinsonsTelemonitoringBenchmark(data_dir=data_dir)
     inc_config, y_star_valid, y_star_test = b.get_best_configuration()
 def setUp(self):
     self.b = NASCifar10C(data_dir="./")