mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 12:10:40 +08:00
[tune] Dragonfly integration ask tell nit (#7593)
* Add sample example * Copy relevant lines of ask from inherited Optimizer * Ignore strategy * Additional changes * Add DragonflySearch for tune connector for Dragonfly * Add example and fix small errors * lint * Remove skopt references * Update example based off of Dragonfly changes * Edit example for final Dragonfly edits * Formatting and documentation edits * Add documentation and add to test pipeline * Address PR comments * Fix Jenkins test * Adjust Dragonfly to PR#7366 * Lint * fix_tests * Minor changes to ordering Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
@@ -93,8 +93,10 @@ class DragonflySearch(SuggestionAlgorithm):
|
||||
"Setting `metric={}` and `mode=max`.".format(reward_attr))
|
||||
|
||||
self._initial_points = []
|
||||
self._opt = optimizer
|
||||
self._opt.initialise()
|
||||
if points_to_evaluate and evaluated_rewards:
|
||||
optimizer.tell(points_to_evaluate, evaluated_rewards)
|
||||
self._opt.tell([(points_to_evaluate, evaluated_rewards)])
|
||||
elif points_to_evaluate:
|
||||
self._initial_points = points_to_evaluate
|
||||
self._max_concurrent = max_concurrent
|
||||
@@ -104,8 +106,6 @@ class DragonflySearch(SuggestionAlgorithm):
|
||||
self._metric_op = -1.
|
||||
elif mode == "max":
|
||||
self._metric_op = 1.
|
||||
self._opt = optimizer
|
||||
self._opt.initialise()
|
||||
self._live_trial_mapping = {}
|
||||
super(DragonflySearch, self).__init__(
|
||||
metric=self._metric, mode=mode, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user