We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f50cbf commit 02a57dfCopy full SHA for 02a57df
python/ray/serve/_private/deployment_scheduler.py
@@ -747,13 +747,13 @@ def key(node_and_num_running_replicas_of_all_deployments):
747
)
748
749
for node_id, _ in sorted(
750
- node_to_running_replicas_of_all_deployments.items(), key=key, reverse=True
+ node_to_running_replicas_of_all_deployments.items(), key=key
751
):
752
if node_id not in node_to_running_replicas_of_target_deployment:
753
continue
754
- for running_replica in node_to_running_replicas_of_target_deployment[
755
- node_id
756
- ]:
+ for running_replica in reversed(
+ list(node_to_running_replicas_of_target_deployment[node_id])
+ ):
757
if len(replicas_to_stop) == max_num_to_stop:
758
return replicas_to_stop
759
else:
0 commit comments