Verified Commit 22e4d18c authored by Raphaël Bleuse's avatar Raphaël Bleuse
Browse files

Clean import statements from scheduler modules

parent e308d431
......@@ -3,10 +3,10 @@ An Easy Backfill scheduler that care a little about topology.
This scheduler consider job as rectangle.
"""
from batsim.batsim import BatsimScheduler
from sortedcontainers import SortedListWithKey
from procset import ProcSet
from sortedcontainers import SortedListWithKey
from batsim.batsim import BatsimScheduler
INFINITY = float('inf')
......
......@@ -15,12 +15,13 @@ Let us assume all machines have the following pstates (corresponding to file
energy_platform_homogeneous.xml)
"""
from batsim.batsim import BatsimScheduler
import sys
from sortedcontainers import SortedSet
from enum import Enum
from procset import ProcSet
from sortedcontainers import SortedSet
from batsim.batsim import BatsimScheduler
class PState(Enum):
......
from batsim.batsim import BatsimScheduler, Batsim
from itertools import islice
import sys
import os
from procset import ProcSet
from itertools import islice
from batsim.batsim import BatsimScheduler
class FillerSched(BatsimScheduler):
......
from batsim.batsim import BatsimScheduler, Batsim, Job
from itertools import islice
import sys
import os
import logging
from procset import ProcSet
from itertools import islice
from batsim.batsim import BatsimScheduler
class FillerSchedWithEvents(BatsimScheduler):
......@@ -93,4 +91,4 @@ class FillerSchedWithEvents(BatsimScheduler):
def onNoMoreEvents(self):
self.scheduleJobs()
\ No newline at end of file
self.scheduleJobs()
from batsim.batsim import BatsimScheduler
from random import sample
from procset import ProcSet
from batsim.batsim import BatsimScheduler
class RandomSched(BatsimScheduler):
def onAfterBatsimInit(self):
......
......@@ -23,9 +23,10 @@ import math
import random
from itertools import islice
from batsim.batsim import BatsimScheduler, Job
from procset import ProcInt, ProcSet
from batsim.batsim import BatsimScheduler, Job
def sort_by_id(jobs):
return sorted(jobs, key=lambda j: int(j.id.split("!")[1].split("#")[0]))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment