Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
ls-daniel committed Mar 21, 2019
1 parent 3aa341f commit f47c24a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions python/ray/autoscaler/autoscaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,8 @@ def target_num_workers(self):
# If we want any workers, we want at least initial_workers
ideal_num_workers = max(ideal_num_workers, initial_workers)

upper = min(self.config["max_workers"], ideal_num_workers)
lower = self.config["min_workers"]
tgt = max(lower, upper)

return tgt
return min(self.config["max_workers"],
max(self.config["min_workers"], ideal_num_workers))

def launch_config_ok(self, node_id):
launch_conf = self.provider.node_tags(node_id).get(
Expand Down

0 comments on commit f47c24a

Please sign in to comment.