8b3f79f3079834f00c7ec62d5decd6bc026c1bc8,python/ray/tune/examples/dragonfly_example.py,,,#,33
Before Change
args, _ = parser.parse_known_args()
ray.init()
tune_kwargs = {
"num_samples": 10 if args.smoke_test else 50,
"config": {
"iterations": 100,
"LiNO3_vol": tune.uniform(0, 7),
"Li2SO4_vol": tune.uniform(0, 7),
"NaClO4_vol": tune.uniform(0, 7)
},
}
// Optional: Pass the parameter space yourself
// space = [{
// "name": "LiNO3_vol",
// "type": "float",
// "min": 0,
// "max": 7
// }, {
// "name": "Li2SO4_vol",
// "type": "float",
// "min": 0,
// "max": 7
// }, {
// "name": "NaClO4_vol",
// "type": "float",
// "min": 0,
// "max": 7
// }]
df_search = DragonflySearch(
optimizer="bandit",
domain="euclidean",
// space=space, // If you want to set the space manually
)
df_search = ConcurrencyLimiter(df_search, max_concurrent=4)
scheduler = AsyncHyperBandScheduler()
tune.run(
objective,
metric="objective",
mode="max",
name="dragonfly_search",
search_alg=df_search,
scheduler=scheduler,
**tune_kwargs)
After Change
)
df_search = ConcurrencyLimiter(df_search, max_concurrent=4)
scheduler = AsyncHyperBandScheduler()
analysis = tune.run(
objective,
metric="objective",
mode="max",
name="dragonfly_search",
search_alg=df_search,
scheduler=scheduler,
num_samples=10 if args.smoke_test else 50,
config={
"iterations": 100,
"LiNO3_vol": tune.uniform(0, 7),
"Li2SO4_vol": tune.uniform(0, 7),
"NaClO4_vol": tune.uniform(0, 7)
},
)
print("Best hyperparameters found were: ", analysis.best_config)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 25
Instances
Project Name: ray-project/ray
Commit Name: 8b3f79f3079834f00c7ec62d5decd6bc026c1bc8
Time: 2020-11-14
Author: rliaw@berkeley.edu
File Name: python/ray/tune/examples/dragonfly_example.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: 8b3f79f3079834f00c7ec62d5decd6bc026c1bc8
Time: 2020-11-14
Author: rliaw@berkeley.edu
File Name: python/ray/tune/examples/nevergrad_example.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: 8b3f79f3079834f00c7ec62d5decd6bc026c1bc8
Time: 2020-11-14
Author: rliaw@berkeley.edu
File Name: python/ray/tune/examples/dragonfly_example.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: 8b3f79f3079834f00c7ec62d5decd6bc026c1bc8
Time: 2020-11-14
Author: rliaw@berkeley.edu
File Name: python/ray/tune/examples/skopt_example.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: 8b3f79f3079834f00c7ec62d5decd6bc026c1bc8
Time: 2020-11-14
Author: rliaw@berkeley.edu
File Name: python/ray/tune/examples/bayesopt_example.py
Class Name:
Method Name: