Skip to content

Commit 59a70da

Browse files
committed
cleanup
1 parent deb557f commit 59a70da

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/auto_scaling_core.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -506,17 +506,17 @@ async def _assign_tasks_to_current_cluster(
506506
cluster: Cluster,
507507
auto_scaling_mode: BaseAutoscaling,
508508
) -> tuple[list, Cluster]:
509-
"""Estimates how tasks will be assigned to cluster's instances
510-
based on the resources required by each task
509+
"""
510+
Evaluates whether a task can be executed on any instance within the cluster. If the task's resource requirements are met, the task is *denoted* as assigned to the cluster.
511+
Note: This is an estimation only since actual scheduling is handled by Dask.
511512
512513
Returns:
513-
A tuple with
514-
- list of unassigned tasks (i.e. those not fitting available machines in cluster)
515-
- same cluster instance as in the input
516-
514+
A tuple containing:
515+
- A list of unassigned tasks (tasks whose resource requirements cannot be fulfilled by the available machines in the cluster).
516+
- The same cluster instance passed as input.
517517
"""
518518
unassigned_tasks = []
519-
assignment_functions = [
519+
assignment_predicates = [
520520
functools.partial(_try_assign_task_to_ec2_instance, instances=instances)
521521
for instances in (
522522
cluster.active_nodes,
@@ -539,7 +539,7 @@ async def _assign_tasks_to_current_cluster(
539539
task_required_ec2_instance=task_required_ec2_instance,
540540
task_required_resources=task_required_resources,
541541
)
542-
for is_assigned in assignment_functions
542+
for is_assigned in assignment_predicates
543543
):
544544
_logger.debug(
545545
"task %s is assigned to one instance available in cluster", task

0 commit comments

Comments
 (0)