Unverified Commit 74fd4a52 authored by xuehui's avatar xuehui Committed by GitHub
Browse files

Fix cold start bug (#800)

* update readme in ga_squad

* update readme

* fix typo

* Update README.md

* Update README.md

* Update README.md

* update readme

* update

* fix path

* update reference

* fix bug in config file

* update nni_arch_overview.png

* update

* update

* update

* update home page

* quickly fix bug in cold start
parent 331405be
......@@ -196,7 +196,7 @@ class MetisTuner(Tuner):
-------
result : dict
"""
if self.samples_x or len(self.samples_x) < self.cold_start_num:
if len(self.samples_x) < self.cold_start_num:
init_parameter = _rand_init(self.x_bounds, self.x_types, 1)[0]
results = self._pack_output(init_parameter)
else:
......@@ -206,8 +206,8 @@ class MetisTuner(Tuner):
no_candidates=self.no_candidates,
minimize_starting_points=self.minimize_starting_points,
minimize_constraints_fun=self.minimize_constraints_fun)
logger.info("Generate paramageters:\n%s", str(results))
logger.info("Generate paramageters:\n" + str(results))
return results
......@@ -226,8 +226,8 @@ class MetisTuner(Tuner):
value = -value
logger.info("Received trial result.")
logger.info("value is :\t%f", value)
logger.info("parameter is :\t%s", str(parameters))
logger.info("value is :" + str(value))
logger.info("parameter is : " + str(parameters))
# parse parameter to sample_x
sample_x = [0 for i in range(len(self.key_order))]
......@@ -340,7 +340,7 @@ class MetisTuner(Tuner):
results_outliers = gp_outlier_detection.outlierDetection_threaded(samples_x, samples_y_aggregation)
if results_outliers is not None:
temp = len(candidates)
#temp = len(candidates)
for results_outlier in results_outliers:
if _num_past_samples(samples_x[results_outlier['samples_idx']], samples_x, samples_y) < max_resampling_per_x:
......@@ -370,12 +370,12 @@ class MetisTuner(Tuner):
temp_improvement = threads_result['expected_lowest_mu'] - lm_current['expected_mu']
if next_improvement > temp_improvement:
logger.infor("DEBUG: \"next_candidate\" changed: \
lowest mu might reduce from %f (%s) to %f (%s), %s\n" %\
lm_current['expected_mu'], str(lm_current['hyperparameter']),\
threads_result['expected_lowest_mu'],\
str(threads_result['candidate']['hyperparameter']),\
threads_result['candidate']['reason'])
# logger.info("DEBUG: \"next_candidate\" changed: \
# lowest mu might reduce from %f (%s) to %f (%s), %s\n" %\
# lm_current['expected_mu'], str(lm_current['hyperparameter']),\
# threads_result['expected_lowest_mu'],\
# str(threads_result['candidate']['hyperparameter']),\
# threads_result['candidate']['reason'])
next_improvement = temp_improvement
next_candidate = threads_result['candidate']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment