Skip to content

Commit

Permalink
Workers do not error out if the tasks cannot be placed.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed May 7, 2024
1 parent 937eee0 commit cc98325
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions data/alibaba_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def __init__(
self._task_cpu_usage_min = self._flags.alibaba_loader_task_cpu_usage_min
self._task_cpu_usage_max = self._flags.alibaba_loader_task_cpu_usage_max
self._task_cpu_usage_random = self._flags.alibaba_loader_task_cpu_usage_random
self._alibaba_bump_resources_of_low_duration_task = self._flags.alibaba_bump_resources_of_low_duration_task
self._alibaba_bump_resources_of_low_duration_task = (
self._flags.alibaba_bump_resources_of_low_duration_task
)

def _construct_workload_definitions(
self,
Expand Down Expand Up @@ -551,9 +553,12 @@ def _convert_job_data_to_job_graph(
* self._task_cpu_multiplier
)
# bump up the resources of low duration tasks
if self._alibaba_bump_resources_of_low_duration_task and task.actual_duration < 4:
if (
self._alibaba_bump_resources_of_low_duration_task
and task.actual_duration < 4
):
resource_usage = self._task_cpu_usage_max

job_resources_1 = Resources(
resource_vector={
Resource(name="Slot_1", _id="any"): resource_usage,
Expand Down
2 changes: 1 addition & 1 deletion workers/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def place_task(
f"[{','.join(t.unique_name for t in worker.get_placed_tasks())}]"
)
self._logger.error(error_message)
raise RuntimeError(error_message)
return False
else:
strategy = execution_strategy

Expand Down

0 comments on commit cc98325

Please sign in to comment.