[tune] Deprecate ambiguous function values (use tune.function / tune.sample_from instead) (#3457)

* wip

* exclude
This commit is contained in:
Eric Liang
2018-12-06 11:35:20 -08:00
committed by GitHub
parent d864f299d7
commit 412aaa5195
13 changed files with 96 additions and 39 deletions
+8 -4
View File
@@ -192,10 +192,14 @@ if __name__ == '__main__':
"gpu": 0.5 if args.use_gpu else 0
},
"config": {
"lr": lambda spec: np.random.uniform(0.001, 0.1),
"momentum": lambda spec: np.random.uniform(0.1, 0.9),
"hidden": lambda spec: np.random.randint(32, 512),
"dropout1": lambda spec: np.random.uniform(0.2, 0.8),
"lr": tune.sample_from(
lambda spec: np.random.uniform(0.001, 0.1)),
"momentum": tune.sample_from(
lambda spec: np.random.uniform(0.1, 0.9)),
"hidden": tune.sample_from(
lambda spec: np.random.randint(32, 512)),
"dropout1": tune.sample_from(
lambda spec: np.random.uniform(0.2, 0.8)),
}
}
},