"git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "cd14c05bf392ee5429a978adb251ab8db2393ccd"
Commit e33b14d5 authored by xuehui's avatar xuehui Committed by fishyds
Browse files

update README in metis and update RuntimeError info (#595)

* update README in metis and update RuntimeError

* fix typo

* add numerical choice check

* update
parent db973f94
...@@ -221,7 +221,8 @@ Metis belongs to the class of sequential model-based optimization (SMBO), and it ...@@ -221,7 +221,8 @@ Metis belongs to the class of sequential model-based optimization (SMBO), and it
* It finds the global optimal point in the Gaussian Process space. This point represents the optimal configuration. * It finds the global optimal point in the Gaussian Process space. This point represents the optimal configuration.
* It identifies the next hyper-parameter candidate. This is achieved by inferring the potential information gain of exploration, exploitation, and re-sampling. * It identifies the next hyper-parameter candidate. This is achieved by inferring the potential information gain of exploration, exploitation, and re-sampling.
Note that the only acceptable types of search space are `choice`, `quniform`, `uniform` and `randint`. Note that the only acceptable types of search space are `choice`, `quniform`, `uniform` and `randint`. We only support
numerical `choice` now. More features will support later.
More details can be found in our paper: https://www.microsoft.com/en-us/research/publication/metis-robustly-tuning-tail-latencies-cloud-systems/ More details can be found in our paper: https://www.microsoft.com/en-us/research/publication/metis-robustly-tuning-tail-latencies-cloud-systems/
......
...@@ -132,10 +132,15 @@ class MetisTuner(Tuner): ...@@ -132,10 +132,15 @@ class MetisTuner(Tuner):
self.x_types[idx] = 'range_continuous' self.x_types[idx] = 'range_continuous'
elif key_type == 'choice': elif key_type == 'choice':
self.x_bounds[idx] = key_range self.x_bounds[idx] = key_range
for key_value in key_range:
if not isinstance(key_value, (int, float)):
raise RuntimeError("Metis Tuner only support numerical choice.")
self.x_types[idx] = 'discrete_int' self.x_types[idx] = 'discrete_int'
else: else:
logger.info("Metis Tuner doesn't support this kind of variable.") logger.info("Metis Tuner doesn't support this kind of variable: " + str(key_type))
raise RuntimeError("Metis Tuner doesn't support this kind of variable.") raise RuntimeError("Metis Tuner doesn't support this kind of variable: " + str(key_type))
else: else:
logger.info("The format of search space is not a dict.") logger.info("The format of search space is not a dict.")
raise RuntimeError("The format of search space is not a dict.") raise RuntimeError("The format of search space is not a dict.")
......
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