mirror of
https://github.com/wassname/ray.git
synced 2026-08-05 13:21:03 +08:00
[tune] fix non-deterministic category sampling by switching back to np.random.choice (#13710)
* Enable zoopt tests again, but wait for next release * Add test and preserve state in trial executor * Add baseline check with integers * [tune] fix non-deterministic category sampling, re-enable zoopt tests * Remove random import * Disable zoopt tests
This commit is contained in:
@@ -198,8 +198,8 @@ class ZOOptSearch(Searcher):
|
||||
|
||||
init_samples = None
|
||||
if self._points_to_evaluate:
|
||||
logger.warning(
|
||||
"`points_to_evaluate` seems to be ignored by ZOOpt.")
|
||||
logger.warning("`points_to_evaluate` is ignored by ZOOpt in "
|
||||
"versions <= 0.4.1.")
|
||||
init_samples = [
|
||||
Solution(x=tuple(point[dim] for dim in self._dim_keys))
|
||||
for point in self._points_to_evaluate
|
||||
@@ -213,8 +213,6 @@ class ZOOptSearch(Searcher):
|
||||
parameter=par,
|
||||
parallel_num=self.parallel_num,
|
||||
**self.kwargs)
|
||||
if init_samples:
|
||||
self.optimizer.init_attribute()
|
||||
|
||||
def set_search_properties(self, metric: Optional[str], mode: Optional[str],
|
||||
config: Dict) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user