A trainable, reproducible, standalone DAG scheduler for heterogeneous task scheduling using Graph Neural Networks and Proximal Policy Optimization with HEFT pretraining.
Overview
GrapheonRL DAG + Heterogeneous Resources
↓
HEFT → Expert Trajectories
↓
Behavioral Cloning → Pretrained GNN Actor
↓
PPO → Direct Makespan Optimization
↓
Independent Inference
The Actor learns to schedule tasks on heterogeneous compute nodes independently of HEFT at inference time. The reward function telescopes: sum(r_t) = -M_RL / M_HEFT, directly aligning training with the evaluation metric.
CPU is fully supported. CUDA is auto-detected if available.
Quick Start
# Full pipeline
make all
# Or step by step:
make prepare # Prepare data and splits
make expert # Generate HEFT expert trajectories
make train-bc # Behavioral cloning pretraining
make train-ppo # PPO training
make evaluate # Evaluation on test set
make test # Run tests
Single ScheduleEngine: All baselines, expert generation, RL, and evaluation share one scheduling kernel — no duplicate EST/EFT logic.
Independent Actor/Critic GNNs: Actor and Critic use separate GATv2 encoders (no parameter sharing), preventing gradient interference.
Action Masking: Illegal actions (infeasible task-node pairs, non-ready tasks) are masked at every stage: training, validation, and inference. Illegal logits are set to -inf.
No HEFT Dependency at Inference: The model learns from HEFT during BC pretraining but operates independently at inference. HEFT makespan is NOT used as a model input.
Static List Scheduling: One DAG = one episode. Exactly num_tasks actions per episode. Non-preemptive serial queue per node.
Architecture
Actor
Task Features + DAG → 3× GATv2Conv (128d, 4 heads) → Task Embeddings
Resource Features → 2× MLP → Resource Embeddings
(Task, Node, Pair) → Pair Scorer MLP (256→128→1) → T×N Logits
Action Mask → Categorical Distribution
Critic
Task Features → Independent 3× GATv2Conv → mean+max pool
Resource Features → Independent MLP → mean+max pool
Global Features → Concat → Value MLP (128→64→1) → V(s)
GrapheonRL GNN-PPO DAG Scheduler
A trainable, reproducible, standalone DAG scheduler for heterogeneous task scheduling using Graph Neural Networks and Proximal Policy Optimization with HEFT pretraining.
Overview
The Actor learns to schedule tasks on heterogeneous compute nodes independently of HEFT at inference time. The reward function telescopes:
sum(r_t) = -M_RL / M_HEFT, directly aligning training with the evaluation metric.Installation
Or with
make:Requirements
pyproject.tomlfor full dependency list.CPU is fully supported. CUDA is auto-detected if available.
Quick Start
Inference
The inference script:
model.eval()andtorch.inference_mode()Project Structure
Key Design Decisions
Single ScheduleEngine: All baselines, expert generation, RL, and evaluation share one scheduling kernel — no duplicate EST/EFT logic.
Independent Actor/Critic GNNs: Actor and Critic use separate GATv2 encoders (no parameter sharing), preventing gradient interference.
Action Masking: Illegal actions (infeasible task-node pairs, non-ready tasks) are masked at every stage: training, validation, and inference. Illegal logits are set to
-inf.No HEFT Dependency at Inference: The model learns from HEFT during BC pretraining but operates independently at inference. HEFT makespan is NOT used as a model input.
Static List Scheduling: One DAG = one episode. Exactly
num_tasksactions per episode. Non-preemptive serial queue per node.Architecture
Actor
Critic
Configuration
All parameters are in YAML configs:
configs/default.yaml— Base configurationconfigs/train_bc.yaml— BC training overridesconfigs/train_ppo.yaml— PPO training overridesconfigs/evaluate.yaml— Evaluation overridesConfigs support inheritance via the
extendskey.Evaluation Metrics
Testing
Tests cover: loader, DAG validation, feasibility, timing, communication, HEFT, expert replay, reward, action mask, environment, checkpoint save/load, and integration tests.
Data
Uses the GrapheonRL STG-JSON dataset:
References
License
MIT. See THIRD_PARTY_NOTICES.md for third-party code attributions.