How priyanshu4solanki/optimizing-resource-allocation-problem works
This repository is an offline cloud-task allocation demo plus a live, folder-driven allocation service. The live workflow accepts a Python script, detects limited import-based dependencies, predicts resource needs, scores eligible workers, writes an assignment ticket, and collects execution results and feedback. The offline demo exercises the predictor–graph encoder–MARL placement pipeline; separate scripts prepare and train cloud-dataset models and export synthetic GNN data. Edges reflect README-documented behavior or shown source references; unsampled live internals are not expanded beyond those limits.
Main entry points: hub.py Hub API and watcher · main_engine.py Synthetic allocation demo · task_runner.py Ticket executor · task_predictors.py Resource prediction
Components 18
Live allocation
- Dashboard
dashboard.html - Hub API and watcher
hub.py - Import dependency analysis
ast_dependency_detector.py - Worker telemetry agent
agent.py - Ticket executor
task_runner.py - Task tickets and scripts
- Execution results
Allocation models
- Resource prediction
task_predictors.py - Task graph encoder
gnn_encoder.py - Candidate state builder
marl_scheduler_bridge.py - MARL placement policy
marl_scheduler.py - Model persistence
model_persistence.py
Offline data and demo
- Synthetic allocation demo
main_engine.py - Cloud dataset preparation
prepare_cloud_model_dataset.py - Cloud model training
train_cloud_dataset.py - Synthetic GNN export
export_gnn_synthetic_dataset.py
Other components
- Uploader
- Worker machine
Connections 25
- Uploader → Dashboard: uploads script
README.md - Uploader → Task tickets and scripts: drops script
README.md - Dashboard → Hub API and watcher: submits upload
README.md - Hub API and watcher → Task tickets and scripts: writes tickets
README.md - Hub API and watcher → Import dependency analysis: detects imports
hub.py - Hub API and watcher → Resource prediction: predicts resources
hub.py - Hub API and watcher → Task graph encoder: encodes tasks
hub.py - Hub API and watcher → Candidate state builder: builds candidate states
hub.py - Hub API and watcher → MARL placement policy: selects assignments
hub.py - Hub API and watcher → Model persistence: loads models
hub.py - Worker telemetry agent → Hub API and watcher: sends telemetry
README.md - Worker machine → Worker telemetry agent: runs agent
README.md - Ticket executor → Task tickets and scripts: polls tickets
README.md - Ticket executor → Execution results: writes results
README.md - Worker machine → Ticket executor: runs executor
README.md - Ticket executor → Hub API and watcher: reports completion
README.md - Hub API and watcher → Execution results: tracks output location
README.md - Synthetic allocation demo → Resource prediction: predicts resources
main_engine.py - Synthetic allocation demo → Task graph encoder: encodes task graph
main_engine.py - Synthetic allocation demo → Candidate state builder: builds joint state
main_engine.py - Synthetic allocation demo → MARL placement policy: allocates tasks
main_engine.py - Synthetic allocation demo → Model persistence: saves checkpoints
main_engine.py - Cloud dataset preparation → Cloud model training: prepares training data
- Synthetic GNN export → Resource prediction: generates estimates
export_gnn_synthetic_dataset.py - Synthetic GNN export → Task graph encoder: builds GNN inputs
export_gnn_synthetic_dataset.py