diff --git a/Cromer/Daily Blog/Week 2 b/Cromer/Daily Blog/Week 2 new file mode 100644 index 0000000..59c1132 --- /dev/null +++ b/Cromer/Daily Blog/Week 2 @@ -0,0 +1,75 @@ +Week 2 +Tuesday June 10th + +- Created several python files to start a simple job scheduler system +- created the folder with 5 initial files +- started working on starter code for the scheduler file and task + +Wed June 11, 2025 + +- Attended AI + Edge Computing Lecture +- * Prepared notes for Thursday’s meeting: +- Initial prototype with `scheduler.py`, `task.py`, `main.py`, and added `node.py` +- Planning logging visibility (similar to `kube-scheduler-simulator`) +- 'Modular scheduler design with plugin-like architecture: filter, score, reserve, bind +- Researched to implementand improve: + - Kubernetes plugin scheduler framework + - YAML-based input simulations (pods/nodes) + - Event logging best practices + +- Practiced Python scheduling logic +- Explored GitHub repo: [kube-scheduler-simulator](https://github.com/kubernetes-sigs/kube-scheduler-simulator) + +- Start problem statement,motivation , and hypothesis for presentation + +Thursday June 12, 2025 + +- **Tasks Completed: + +- Met with the writing coach to discuss how to present and explain technical progress more clearly. +- Continued reviewing how to improve the project code based on my research into scheduling simulations and Kubernetes schedulers. +- Met with the team at 3 PM for regular project sync. +- Met with Yongho after the team meeting to review the code I’ve written so far and discuss the next steps. + +- Code Progress: + +- Began implementing a new Node class (node.py) to simulate compute nodes (rpi, jetson, blade) for more realistic task execution modeling. +- Planning to use this class to: +- Simulate real node states +- Monitor resource usage +- Implement distributed task execution logic +- Reset system state for multiple test runs +- Inject simulated workloads +- *Adjusting the scheduler.py file so that it delegates execution to nodes, not the scheduler directly. + + Friday June 13, 2025 + - In Progress: from the day before + - Continuing to explore modular scheduling based on plugin-style patterns inspired byKu bernetes (Filter, Score, Bind phases). +- Preparing to integrate logging and metrics tracking for node performance and task flow. +- Added functionality to: +- Print how many times each task was executed +- Track how many tasks each node handled +- Log which node executed which task + + Meeting +- Met with Yongho for progress check-in. + +Code Improvements +- ✅ Fixed initial import/module errors in scheduler setup. +- ✅ Enhanced scheduler system to: + 1. Track how many times each task was executed. + 2. Introduce a `Node` class to simulate compute nodes: `rpi`, `jetson`, and `blade`. + 3. Assign tasks to nodes dynamically — nodes now execute the tasks, not the scheduler. + 4. Log which node executes which task. + 5. Add execution summaries grouped by both task and node. + + Study / Research +- Read GitHub repositories related to **edge resource analysis** to explore real-world scheduler designs. +- Watched tutorials/videos to better understand edge computing task allocation patterns. + +Next Steps +- Expand node simulation to include resource capacity and load balancing. +- Look into logging task failures or retries. +- Possibly add threading to simulate parallel execution across nodes. + + diff --git a/Cromer/Daily Blog/Week 3 b/Cromer/Daily Blog/Week 3 new file mode 100644 index 0000000..28ab258 --- /dev/null +++ b/Cromer/Daily Blog/Week 3 @@ -0,0 +1,25 @@ +Weekly Progress Log + +Monday June 16,2025 + • Watched Python tutorial videos to strengthen scripting skills. + • Conducted research on scheduler simulators for distributed systems. + • Began reviewing relevant GitHub repositories related to task scheduling and edge computing. + +Tuesday June 17,2025 + • Continued reading and analyzing GitHub repositories. + • Focused on understanding the logic and structure behind existing scheduler implementations. + • Attended Dr. Wilkie’s CS seminar on High Performance Computing (HPC), gaining insights into large-scale task scheduling and system efficiency. + + Wednesday June 18,2025 + • Participated in two academic seminars. + • Deepened understanding of repository logic and scheduling strategies through hands-on code reading. + +Thursday June 19,2025 + • Met with mentor in the morning to discuss project goals and roadmap. + • Set up Linux development environment on a laptop for code testing. + • Successfully ran the wiggle scheduler code; identified an error in an alternate scheduler implementation. + • Met with the project team in the afternoon for collaboration and planning. +Friday June 20, 2025 + • Revisited the scheduler code to reinforce understanding of its logic and structure. + • Took detailed notes on areas for improvement and potential refactoring. + • Prepared for the upcoming week by outlining next steps and identifying key focus areas. diff --git a/Cromer/Daily Blog/Week 4 b/Cromer/Daily Blog/Week 4 new file mode 100644 index 0000000..fe22a72 --- /dev/null +++ b/Cromer/Daily Blog/Week 4 @@ -0,0 +1,117 @@ + +Weekly Log: Scheduler Integration and Optimization (Week of June 24) + + +Weekly deliverables + +Task 1: +Run and test simulation using Quick Start instructions + +Task 2-1: + Uncomment scheduler in mywaggle.yaml + +Task 2-2: + Fix bug in FairshareScheduler and demonstrate it running in simulation + +Task 3: + Integrate Henry’s dual descent scheduler from Colab link into the scheduler/ directory and run it with simulation + + + +Monday + +• Met with Yongho → Received this week’s deliverables + +• Completed: +• Passport Safety Training +• Section 101 Security Training +• Additional safety module +• Started: + +• Task 1: README.md Quick Start +• Ran, tested, and debugged simulation code +• Investigated bug in FairshareScheduler + + + +Tuesday + +• Worked on research journal: methodology & design notes +Focused on: + +• Fixing Fairshare bug: +error line 10 + +# Old (error) +cpu_usage = [node.metrics["cpu"] for node in nodes] + +# Fixed: +cpu_usage = [node.metrics.get("cpu", float(”inf”)) for node in nodes] + + +Had to fix errors to make code run : +• Installed missing packages (tensorboard) +eea971c8f87b5cf2e53c94398ccd6f773a16adfe +0080f1099258f363167f8bdc8ded18c1defcdcaf + +• Used --config flag to avoid manually selecting the YAML file every run: + +--config /home/kendal/edge_resource_analysis/simulation/kubernetes/mywaggle.yaml + + +Completed Task 2-2 → Working demonstration of FairshareScheduler with debugged logic + + + + +Wednesday + +• Moved Henry’s dual descent code into the scheduler/ directory (dual_node.py) + +• Installed cvxpy: + +Bash: pip install cvxpy + +• Fixed henry code for the dualnode.py : + 46b2a7c7a65af8114c42dca50a599d0c06d85433 + +• Learned: + +• cvxpy enables mathematical optimization in Python using variables, objectives, constraints + +• Attended a seminar (HPC focus) + +• Wrote prep notes for Thursday code explanation for the meeting + + + +Thursday + +• Morning: Met with mentor to review simulation logic and scheduler goals + +• Afternoon: Met with team + +• Reached out to Work with Henry to: + +• Clarify lambda format + +• Continue testing dual descent scheduler + +• Make centralized_solver.py runnable with simulation + +• Understand and get clarification on the output of the code match his that he ran and mine + + + + +Friday + +• Completed Task 3: Integrated and ran Henry’s scheduler in the simulation + +• Verified: It integrates with run.py +• CVXPY logic solves the problem and dual update works +• Reviewed SAGE documentation for formatting results: +https://www.anl.gov/mcs/Sage-MSRI-1 + +• Started working on next steps for my journal + diff --git a/Cromer/Daily Blog/Week5.md b/Cromer/Daily Blog/Week5.md new file mode 100644 index 0000000..0aa4965 --- /dev/null +++ b/Cromer/Daily Blog/Week5.md @@ -0,0 +1,88 @@ +Weekly Progress Log – Scheduler Evaluation & Visualization (July 1–5, 2025) + +Weekly Focus: + + Extracting meaningful metrics from TensorBoard + Comparing performance between WaggleScheduler and FairshareScheduler + Fixing energy consumption reporting bugs + Building visualizations for clarity + Adapting Henry’s dual descent scheduler into simulation + + + + +Goals for this week + + +Task 1 +Convert TensorBoard logs into CSV for better metric visibility + +Task 2 +Add per-node statistics: mean energy, workload count, task time + +Task 3 +Compare all metrics across different schedulers + +Fixes +Address bug where TensorBoard showed energy=0 despite CPU usage + +Enhancement +Add support for visualizing and identifying scheduler results + +Research +Integrate Henrys dual_descent into new scheduler module + + +Monday + + 🛠 Bugfix: Fixed issue where TensorBoard reported 0 energy usage even with non-zero CPU. + subtask : bug fix 26c24d2a7f13a7f0fafd66713ecb27390a0f12b0 + + 🔧 Added new metrics lines to __init__() for energy tracking. + ✅ Simulation now records meaningful energy data. + 🧪 Verified both WaggleScheduler and FairshareScheduler logs generate usable CSVs. + + + + +Tuesday + + 🤝 Met with Henry to discuss dual descent scheduler integration. + 📈 Clarified expected output from dual_descent: + A matrix like: + [[0, 1], [1, 0], [0, 1]] → Each row = workload, column = node. + 🧠 Brainstormed how to pass simulation state to dual descent function. + 🧰 Began adapting simulation run to accept new dual-descent placement matrix. + + + + +Wednesday + Met with Yongho + ✅ Updated run.py line 103 to include total energy in TensorBoard logs. + 📊 TensorBoard now outputs energy correctly. + 🧠 Brainstormed visual identification for scheduler logs: + Current challenge: All logs look similar (over 30+), hard to trace which run = which scheduler. + Solution: Need clear naming/labeling for scheduler in TensorBoard or CSV. + + + +Thursday + + 🎨 Finished first version of visualization code: + Plots energy, task count, execution time per node. + + ✅ Task 2 completed: all metrics per node calculated. + ✅ Task 3 attempted: + CSV output works + ❌ Error: [ERROR] No scheduler data to compare. + Suspected cause: TensorBoard logs don’t differentiate waggle vs fairshare + + + 🔧 Fixed file path bugs that caused directory mismatch errors earlier. + 🧪 Now receives output files with task metrics per scheduler — working toward full comparison. + +my new working code +f5bbbf49b94c5a4feaf7fbb2faf3b11c91e38df7 + + diff --git a/Cromer/Daily Blog/Week7.md b/Cromer/Daily Blog/Week7.md new file mode 100644 index 0000000..d368736 --- /dev/null +++ b/Cromer/Daily Blog/Week7.md @@ -0,0 +1,117 @@ +July 14- 18 + +Final goal to show for presentation: +Visual Results (WIP) + +Generated CSV: + + logs/WaggleScheduler_task_log.csv + logs/FairshareScheduler_task_log.csv + Comparison Output: + logs/scheduler_comparison_metrics.csv + Plotted: + mean_energy_comparison.png + num_tasks_comparison.png + avg_task_time_comparison.png + + + Monday + + + + Finalized metrics to collect: mean energy, task count, avg execution time per node. + Updated the task logger to include start_time, end_time, and energy_consumed_joules. + Wrote extract_metrics() function to compute per-node statistics. + Successfully generated CSVs for both WaggleScheduler and FairshareScheduler. + + + +📁 Output: + + + logs/WaggleScheduler_task_log.csv + logs/FairshareScheduler_task_log.csv + + + + + + +Tuesday + + + + Created comparison script to merge Waggle and Fairshare metrics into: + logs/scheduler_comparison_metrics.csv + + Validated that each node’s stats reflect accurate workload and energy data. + + + +🧪 Learned: + + + Efficient use of pandas.groupby() and datetime arithmetic. + How scheduler design affects per-node behavior. + + + + + + + +Wednesday + + + + Plotted three graphs using pandas.plot() and matplotlib: + mean_energy_comparison.png + num_tasks_comparison.png + avg_task_time_comparison.png + + Each plot visualizes metrics side-by-side for Waggle and Fairshare across nodes. + + + +📈 Visuals help: + + + Quickly assess which scheduler is more energy-efficient or better at balancing load. + + +Thursday + + + + Edited waggle.yml to add more nodes: + 2x Raspberry Pi + 2x Jetson + 1x Blade + + Ensured rpi node participates in scheduling. + Ran simulation again to confirm expanded topology worked as expected. + + + +💡 Learned: + + + YAML structure and impact of node types on task distribution and power use. + + + + + + +Friday + + + + Worked on poster section: Visual Results (WIP). + Added key insights from graph analysis: + Waggle is more energy-efficient but not always fastest. + Fairshare balances task count better on high-power nodes. + + Added key takeaways for “Learning on the Lawn” presentation. + + diff --git a/Cromer/Daily Blog/Week8.md b/Cromer/Daily Blog/Week8.md new file mode 100644 index 0000000..4129448 --- /dev/null +++ b/Cromer/Daily Blog/Week8.md @@ -0,0 +1,25 @@ +Main Goals: + + + Begin working on final internship paper and PowerPoint presentation + Finalize CSV converter and finish debugging scripts + Analyze and visualize energy, CPU, memory statistics + + + +Tasks Completed: + + + ✅ Finished debugging and finalized the TensorBoard to CSV converter + ✅ Visualized resource stats: energy, CPU, memory using .ipynb + ✅ Observed that energy values were identical under one scheduler + ✅ Commented out FairShare in notebook to isolate WaggleScheduler logs + ✅ Manually compared scheduler outputs by changing file names + ✅ Collected workload data: + Number of running vs finished workloads + Compared stats from running simulation with 2 nodes vs 6 nodes + + ✅ Investigated whether performance improved with Jetson vs RPi, or 3+3 distribution + ✅ Finalized all scheduler module logic and visualizations + + diff --git a/Cromer/Daily Blog/week 6.md b/Cromer/Daily Blog/week 6.md new file mode 100644 index 0000000..06a0e5f --- /dev/null +++ b/Cromer/Daily Blog/week 6.md @@ -0,0 +1,122 @@ +Weekly Progress Log – Scheduler Evaluation & Visualization (July 7-11 2025) + +Task this week + + +Continue Focus on visualization this week + +Answer which one is better? + +Waggle scheduler used less energy + + + CSV - data format + +compare that respect which one works better which one works worse + + +70% focus : + +Task 2: add more metrics about the statistics of the logs, for example mean energy consumption of each compute node, how many workloads (applications) did each node take, etc. + + +Task 3: get all the metrics we added in Task 2 against different schedulers. For example, run the simulation with WaggleScheduler, get all metrics, and change the scheduler to Fairshare and get metrics again. It will be interesting to compare the metrics between the schedulers and which one is better. + + + +30%: +Make Henry’s code like the other schedulers formats + + +Monday +Met with yongho + + + + +Tuesday + +Task 2: add more metrics about the statistics of the logs, for example mean energy consumption of each compute node, how many workloads (applications) did each node take, etc. + + +Finish working on visualization + +Start Make Henry’s code like the other schedulers formats + + +fix henry code +dfd18f186b64a0a09ec752335d72e25488440ec9 + + + + +Wednesday + +reformatted version of your DualDescent class in a style consistent with typical scheduler classes. + +Added docstrings and argument descriptions. + +• Renamed id to node_id to avoid Python built-in shadowing. + +• Moved the algorithm into a schedule() method (assuming your schedulers implement scheduling this way). + +• Added placeholder TODOs for stopcondition() and share() to clarify they need implementation. + +• Fixed while not self.stopcondition() (you want to loop until stopping condition). +• Consistent use of self. attributes. +• Proper numpy array shapes in initialization. +• Added comments consistent with your other schedul + + + + +Task 3: get all the metrics we added in Task 2 against different schedulers. For example, run the simulation with WaggleScheduler, get all metrics, and change the scheduler to Fairshare and get metrics again. It will be interesting to compare the metrics between the schedulers and which one is better. + + + +Prepare slides for meeting + +Update methodology and approach + +Work on results portion for presentation journal + + + + + +Thursday + +Morning Meeting +Evening meeting with yongho n northwestern team + + +TODOs: + +Under kubernetes/logs we want those directories with datetime to be datetime-"scheduler name" +By Updating TensorBoard class to accept a scheduler name and include it in the + +Fix csvexport.py + + + +Finalize writing results ( what I’ve learned) for my journal + + +Friday: +Fix tensorboarrd.py +7694c6a6ee21b4350a216cf899257cded380f27c + + +Final goal to show for presentation: +Visual Results (WIP) + +Generated CSV: + + logs/WaggleScheduler_task_log.csv + logs/FairshareScheduler_task_log.csv + Comparison Output: + logs/scheduler_comparison_metrics.csv + Plotted: + mean_energy_comparison.png + num_tasks_comparison.png + avg_task_time_comparison.png \ No newline at end of file diff --git a/Cromer/Daily Blog/week10.md b/Cromer/Daily Blog/week10.md new file mode 100644 index 0000000..6278be4 --- /dev/null +++ b/Cromer/Daily Blog/week10.md @@ -0,0 +1,23 @@ +Week 10 + +Main Goals: + Final documentation push + Final review with team + Implement feedback and polish deliverables + + + +Tasks Planned: + Mon–Tue: Complete documentation under /simulation/kubernetes/ + +commit id : +90cb458cb2f73332d0d375c3a8648d13dfa1cced (kubernetes documentation) +625f91052c30edc301c43cbb9e2540438311752b (scheduler documentation) + + Add use case: energy impact of different schedulers + Wed (Aug 6): Final 2-hr team review meeting to evaluate project and documentation + Thu–Fri: Iterate on code, plots, and docs based on team feedback + Finish up PowerPoint for PCU + Walk through checklist to ensure all components are ready for handoff + + diff --git a/Cromer/Daily Blog/week9.md b/Cromer/Daily Blog/week9.md new file mode 100644 index 0000000..4c0bab4 --- /dev/null +++ b/Cromer/Daily Blog/week9.md @@ -0,0 +1,47 @@ +Week 9 + +Main Goals: + + + Finalize visualizations and slides + Prepare for Thursday’s informal presentation + Begin drafting user-facing documentation + + + +Tasks Completed: + + + ✅ Created presentation graphics and plots for metrics comparison + ✅ Delivered informal presentation + Overview of project + Architecture diagram (nodes, scheduler, tasks) + Scheduler comparison metrics + Key insights and takeaways + Question & Answer + + ✅ Prepared meeting notes for Thursday’s Argonne discussion + ✅ Participated in “Learning on the Lawn” session with team + ✅ On Friday: + Walked through all simulation and output logs + Reviewed and started drafting documentation: + Overview and install instructions + Sample run output and example use case + Description of scheduler concepts and steps performed + Target metrics (e.g., energy consumption) + + + +Documentation Goals Started: + + What is the purpose of the scripts in kubernetes ? + How to run a basic simulation? + How to change schedulers and locate logs? + How to generate plots from results? + + + + + + + diff --git a/Cromer/Edge_Scheduler_Sim/README.md b/Cromer/Edge_Scheduler_Sim/README.md new file mode 100644 index 0000000..aa7789a --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/README.md @@ -0,0 +1,80 @@ +🧾 Project Overview + +This project simulates a basic task scheduling system designed to mimic how tasks are distributed and run on different types of computers in an edge computing environment. It models a simple scheduler that assigns tasks to various compute nodes, each representing a different kind of hardware device. + + +🧱 Components + + + +- main.py + +This is the main script that: + +Creates a Scheduler instance. +Registers 3 example tasks (Task A, Task B, and Task C). +Executes all tasks through the scheduler. + + + +- scheduler.py + +Defines the Scheduler class. +It: + +Stores all registered tasks. +Initializes 3 compute nodes, each representing a different kind of computer: +🧠 rpi – A Raspberry Pi, a small single-board computer commonly used in IoT. +⚡ jetson – An NVIDIA Jetson, designed for edge AI computing with GPUs. +💻 blade – A blade server, a powerful, rack-mounted machine used in data centers. + +When running tasks: +Randomly assigns each task to one of the three compute nodes. +Tells the node to run the task. +Tracks how many times each task is executed. + +Prints a summary of task executions at the end. + + + +- node.py + +Defines the ComputeNode class. Each node: + + + +Has a name (representing the type of computer it simulates). +Receives tasks from the scheduler. +Runs the task function and prints which node handled it. + + + +- task_a.py , task_b.py , task_c.py + +Each file contains a function that simulates a real task: + +run_task_a, run_task_b, and run_task_c simulate execution using time.sleep(). +They print start and completion messages for visibility. + + +- Output + +Assigned task 'Task A' to node 'jetson' +Node jetson is executing: Task A +Task A started +Task A completed + +Assigned task 'Task B' to node 'rpi' +Node rpi is executing: Task B +Task B started +Task B completed + +Assigned task 'Task C' to node 'blade' +Node blade is executing: Task C +Task C started +Task C completed + +=== Task Execution Summary === +Task A: 1 time(s) +Task B: 1 time(s) +Task C: 1 time(s) \ No newline at end of file diff --git a/Cromer/Edge_Scheduler_Sim/__pycache__/node.cpython-313.pyc b/Cromer/Edge_Scheduler_Sim/__pycache__/node.cpython-313.pyc new file mode 100644 index 0000000..44425e6 Binary files /dev/null and b/Cromer/Edge_Scheduler_Sim/__pycache__/node.cpython-313.pyc differ diff --git a/Cromer/Edge_Scheduler_Sim/__pycache__/scheduler.cpython-313.pyc b/Cromer/Edge_Scheduler_Sim/__pycache__/scheduler.cpython-313.pyc new file mode 100644 index 0000000..03dd2ca Binary files /dev/null and b/Cromer/Edge_Scheduler_Sim/__pycache__/scheduler.cpython-313.pyc differ diff --git a/Cromer/Edge_Scheduler_Sim/__pycache__/task_a.cpython-313.pyc b/Cromer/Edge_Scheduler_Sim/__pycache__/task_a.cpython-313.pyc new file mode 100644 index 0000000..2365905 Binary files /dev/null and b/Cromer/Edge_Scheduler_Sim/__pycache__/task_a.cpython-313.pyc differ diff --git a/Cromer/Edge_Scheduler_Sim/__pycache__/task_b.cpython-313.pyc b/Cromer/Edge_Scheduler_Sim/__pycache__/task_b.cpython-313.pyc new file mode 100644 index 0000000..b595a99 Binary files /dev/null and b/Cromer/Edge_Scheduler_Sim/__pycache__/task_b.cpython-313.pyc differ diff --git a/Cromer/Edge_Scheduler_Sim/__pycache__/task_c.cpython-313.pyc b/Cromer/Edge_Scheduler_Sim/__pycache__/task_c.cpython-313.pyc new file mode 100644 index 0000000..6c4462c Binary files /dev/null and b/Cromer/Edge_Scheduler_Sim/__pycache__/task_c.cpython-313.pyc differ diff --git a/Cromer/Edge_Scheduler_Sim/main.py b/Cromer/Edge_Scheduler_Sim/main.py new file mode 100644 index 0000000..9ac4d0c --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/main.py @@ -0,0 +1,26 @@ +# This is the main entry point for the Edge Scheduler Simulation. +# It initializes the scheduler and registers tasks to be executed. +# Edge_Scheduler_Sim/main.py +# main.py + +from scheduler import Scheduler +from task_a import run_task_a +from task_b import run_task_b +from task_c import run_task_c +from node import ComputeNode + +# Create nodes +rpi = ComputeNode("rpi") +jetson = ComputeNode("jetson") +blade = ComputeNode("blade") + +nodes = [rpi, jetson, blade] + +# Initialize scheduler with nodes +scheduler = Scheduler(nodes) +scheduler.register_task("Task A", run_task_a) +scheduler.register_task("Task B", run_task_b) +scheduler.register_task("Task C", run_task_c) + +# Run all tasks +scheduler.run_all() \ No newline at end of file diff --git a/Cromer/Edge_Scheduler_Sim/node.py b/Cromer/Edge_Scheduler_Sim/node.py new file mode 100644 index 0000000..60b0967 --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/node.py @@ -0,0 +1,11 @@ + +# node.py + +class ComputeNode: + def __init__(self, name): + self.name = name + + def run_task(self, task_name, task_func): + print(f"[{self.name}] Running task: {task_name}") + task_func() + print(f"[{self.name}] Finished task: {task_name}") diff --git a/Cromer/Edge_Scheduler_Sim/scheduler.py b/Cromer/Edge_Scheduler_Sim/scheduler.py new file mode 100644 index 0000000..dddbf6d --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/scheduler.py @@ -0,0 +1,26 @@ + +# scheduler.py + +import random + +class Scheduler: + def __init__(self, nodes): + self.tasks = [] + self.task_counter = {} + + self.nodes = nodes # List of Node objects + + def register_task(self, name, func): + self.tasks.append((name, func)) + self.task_counter[name] = self.task_counter.get(name, 0) + + def run_all(self): + for name, func in self.tasks: + node = random.choice(self.nodes) + print(f"Assigning {name} to node {node.name}") + node.run_task(name, func) + self.task_counter[name] += 1 + + print("\nExecution Summary:") + for task, count in self.task_counter.items(): + print(f"{task}: executed {count} time(s)") \ No newline at end of file diff --git a/Cromer/Edge_Scheduler_Sim/task_A.py b/Cromer/Edge_Scheduler_Sim/task_A.py new file mode 100644 index 0000000..5c26778 --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/task_A.py @@ -0,0 +1,11 @@ + +#task_a.py + +import time + +def run_task_a(): + print("Task A started") + time.sleep(1) + print("Task A completed") + + diff --git a/Cromer/Edge_Scheduler_Sim/task_B.py b/Cromer/Edge_Scheduler_Sim/task_B.py new file mode 100644 index 0000000..0a4bd48 --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/task_B.py @@ -0,0 +1,8 @@ +#task_b.py + +import time + +def run_task_b(): + print("Task B started") + time.sleep(2) + print("Task B completed") diff --git a/Cromer/Edge_Scheduler_Sim/task_C.py b/Cromer/Edge_Scheduler_Sim/task_C.py new file mode 100644 index 0000000..6e16daf --- /dev/null +++ b/Cromer/Edge_Scheduler_Sim/task_C.py @@ -0,0 +1,8 @@ +#task_c.py + +import time + +def run_task_c(): + print("Task C started") + time.sleep(1.5) + print("Task C completed") diff --git a/Cromer/README.md b/Cromer/README.md new file mode 100644 index 0000000..ad7a8e4 --- /dev/null +++ b/Cromer/README.md @@ -0,0 +1,38 @@ + +# 🧩 My First GitHub Project + +This is a test project to play around with GitHub, learn version control, and practice pushing code, editing files, and writing READMEs. + + +## 🚀 Project Purpose + +This repo is for experimenting with: + +- `git init`, `git add`, `git commit`, `git push` +- Creating branches and pull requests +- Editing files directly on GitHub +- Writing clean and fun documentation + +--- + +## 💻 Getting Started + +To clone and run this project locally: + +```bash +git clone https://github.com/kendalcoder/summer2025.git +cd Cromer +python main.py + + +# main.py +```python +from sklearn.datasets import load_iris +from sklearn.tree import DecisionTreeClassifier + +iris = load_iris() +model = DecisionTreeClassifier() +model.fit(iris.data, iris.target) +print("Model trained. Accuracy:", model.score(iris.data, iris.target)) +``` +