class TestFCNetProteinStructure(unittest.TestCase):
    def setUp(self):
        self.b = FCNetProteinStructureBenchmark(
            data_dir="./fcnet_tabular_benchmarks/")

    def test_random_sampling(self):
        config = self.b.get_configuration_space().sample_configuration()
        self.b.objective_function(config)
Beispiel #2
0
    b = FCNetNavalPropulsionBenchmark(data_dir=args.data_dir)

elif args.benchmark == "parkinsons_telemonitoring":
    b = FCNetParkinsonsTelemonitoringBenchmark(data_dir=args.data_dir)

output_path = os.path.join(args.output_path, "random_search")
os.makedirs(os.path.join(output_path), exist_ok=True)

cs = b.get_configuration_space()

runtime = []
regret = []
curr_incumbent = None
curr_inc_value = None

rt = 0
X = []
for i in range(args.n_iters):
    config = cs.sample_configuration()

    b.objective_function(config)

if args.benchmark == "nas_cifar10a" or args.benchmark == "nas_cifar10b" or args.benchmark == "nas_cifar10c":
    res = b.get_results(ignore_invalid_configs=True)
else:
    res = b.get_results()

fh = open(os.path.join(output_path, 'run_%d.json' % args.run_id), 'w')
json.dump(res, fh)
fh.close()
Beispiel #3
0
from tabular_benchmarks import FCNetProteinStructureBenchmark

b = FCNetProteinStructureBenchmark(data_dir="./fcnet_tabular_benchmarks/")
cs = b.get_configuration_space()
config = cs.sample_configuration()

print("Numpy representation: ", config.get_array())
print("Dict representation: ", config.get_dictionary())

max_epochs = 100
y, cost = b.objective_function(config, budget=max_epochs)
print(y, cost)