Skip to content

Commit

Permalink
Fix accounting issue leading to TASK_NOT_READY errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed Nov 5, 2023
1 parent a28a296 commit a8da08f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions schedulers/tetrisched_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ def schedule(
# AllocationExpression for their current allocations so as to correctly
# account for capacities at each time discretization.
for task in previously_placed_tasks:
task_strl = self.construct_task_strl(sim_time, task, partitions)
if task_strl is not None:
objective_strl.addChild(task_strl)
# If this child is not in the TaskGraphs to be scheduled, then we
# add it to the root expression.
if task.task_graph not in task_graph_names:
task_strl = self.construct_task_strl(sim_time, task, partitions)
if task_strl is not None:
objective_strl.addChild(task_strl)

# Construct the rewards for placement of the tasks.
# Find the plan-ahead window to normalize the rewards for the tasks.
Expand Down Expand Up @@ -175,7 +178,8 @@ def schedule(
current_time=sim_time,
task_graph=task_graph,
partitions=partitions,
tasks_to_be_scheduled=tasks_to_be_scheduled,
tasks_to_be_scheduled=tasks_to_be_scheduled
+ previously_placed_tasks,
placement_rewards=placement_rewards,
)
if task_graph_strl is not None:
Expand Down

0 comments on commit a8da08f

Please sign in to comment.