Skip to content

Add PEFT scheduler - #67

Merged
jaredraycoleman merged 2 commits into
mainfrom
feature/peft-scheduler
Jul 22, 2026
Merged

Add PEFT scheduler#67
jaredraycoleman merged 2 commits into
mainfrom
feature/peft-scheduler

Conversation

@jaredraycoleman

@jaredraycoleman jaredraycoleman commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the PEFT scheduler (Predict Earliest Finish Time; Arabnejad & Barbosa, 2014, https://doi.org/10.1109/TPDS.2013.57), a list-scheduling heuristic that uses an Optimistic Cost Table (OCT) for lookahead:

  • OCT — for each (task, processor), the optimistic minimum time to finish all descendants (assuming each is placed on its own best processor).
  • Ranking — tasks are ordered by average OCT across processors.
  • Processor selection — each ready task is placed on the processor minimizing optimistic EFT = earliest finish time + that processor's OCT lookahead.

Unlike HEFT (which is greedy on EFT alone), PEFT's OCT gives it one-step lookahead into downstream cost. It does not use task duplication.

This brings the implementation from the earlier PEFT branch onto current main (the original PR's branch was deleted), registers it in schedulers/__init__.py, and adds it to the parametrized scheduler suite so it is exercised on the standard DAGs.

Type of change

  • New scheduler

Tests

PEFTScheduler is now in tests/test_schedulers.py, run across the diamond/chain/fork graphs. Full suite: 124 passing. Clean under ruff and mypy.

Notes for reviewers

Original author: @jasonlopez5. Worth a close read against the paper's OCT recurrence and the optimistic-EFT selection rule.

Note on communication cost in the OCT (intentional divergence from the paper)

PEFT computes the OCT using the edge's average communication cost, because the paper's examples assume uniform inter-processor links (the widely-used reference implementation notes the paper does not even provide a heterogeneous communication matrix). Under uniform links, average and per-link cost are identical.

SAGA models heterogeneous per-link speeds, and the OCT is indexed by (task, processor), so both endpoints of every transfer are known at computation time. This implementation therefore uses the actual link cost between the two processors rather than the average. It reduces exactly to the paper on uniform-communication networks and is the faithful extension to fully-heterogeneous ones; collapsing SAGA's real link heterogeneity into a single average would blunt PEFT's defining lookahead and unfairly handicap it against schedulers that see the full network. Documented in OCT_table's docstring.

PEFT (Predict Earliest Finish Time; Arabnejad & Barbosa, 2014) is a list
scheduler that uses an Optimistic Cost Table (OCT) for lookahead: it ranks tasks
by average OCT and places each on the processor minimizing optimistic EFT
(earliest finish time plus the OCT lookahead).

Brings the implementation from the earlier PEFT branch onto current main,
registers it, and adds it to the parametrized scheduler suite.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new PEFTScheduler implementation to Saga’s scheduler suite, exposing it via saga.schedulers and exercising it in the standard scheduler test parametrization.

Changes:

  • Introduces src/saga/schedulers/peft.py implementing PEFT with OCT-based ranking and optimistic-EFT processor selection.
  • Registers PEFTScheduler in src/saga/schedulers/__init__.py for public import.
  • Adds PEFTScheduler() to the parametrized scheduler list in tests/test_schedulers.py.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/test_schedulers.py Adds PEFT to the shared scheduler test matrix.
src/saga/schedulers/peft.py Implements PEFT (OCT table + ranking + processor selection).
src/saga/schedulers/init.py Exports PEFTScheduler from the schedulers package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +109 to +113
if schedule is not None:
start_time = schedule.get_earliest_start_time(
task=task_name, node=processor.name, append_only=False
)
start_time = max(start_time, min_start_time)
Comment on lines +104 to +108
best_start_time = 0.0
best_end_time = 0.0
best_rank = np.inf
best_processor = None
for processor in network.nodes:
from saga import Schedule, Scheduler, ScheduledTask, TaskGraph, Network, NetworkNode


def OCT_table(task_graph: TaskGraph, network: Network) -> Dict[str, Dict[str, float]]:
The paper uses the edge's average communication cost in the OCT (its examples
assume uniform inter-processor links). SAGA models heterogeneous per-link
speeds, and the OCT is indexed by (task, processor), so both transfer endpoints
are known; this implementation uses the actual link cost between the two
processors. That reduces to the paper on uniform-communication networks and is
the faithful extension to fully-heterogeneous ones. Documented so the divergence
reads as intentional.
@jaredraycoleman
jaredraycoleman merged commit 088fc0b into main Jul 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants