Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler uses classad functionality for matchmaking and scheduling #77

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8e26665
improved scheduling by using quantize for clustering
eileen-kuehn Nov 29, 2019
b24059e
Merge branch 'master' into feature/classad
eileen-kuehn Dec 12, 2019
f6dc51a
Merge branch 'master' into feature/classad
eileen-kuehn Dec 12, 2019
3935d4a
job as weakref and fixed small typo
eileen-kuehn Dec 12, 2019
ac5ee4a
adapted scheduler to work with classads
eileen-kuehn Dec 12, 2019
dd63690
removed redundant update of drone at scheduler
eileen-kuehn Dec 16, 2019
b9a3d0a
current implementation of scheduling with classads
eileen-kuehn Dec 16, 2019
10df7bc
added base class for job scheduler
eileen-kuehn Jan 31, 2020
2f8bec6
added older scheduler and renamed classad scheduler to CondorClassadJ…
eileen-kuehn Jan 31, 2020
7722f12
CondorJobScheduler now implements interface of JobScheduler
eileen-kuehn Jan 31, 2020
5fc237f
added possibility to save temporary resources at drone wrapper
eileen-kuehn Jan 31, 2020
6461b92
added docstrings to scheduler base class
eileen-kuehn Jan 31, 2020
4589d88
condor classad scheduler draft
maxfischer2781 Feb 12, 2020
bae946d
Merge branch 'feature/classad' of github.com:MatterMiners/lapis into …
maxfischer2781 Feb 12, 2020
3c3bbc6
added hash for wrappedclassad
eileen-kuehn Feb 12, 2020
ee779a4
made scheduler working
eileen-kuehn Feb 12, 2020
a2bf316
updating of available resources in drones, closes #82
eileen-kuehn Feb 12, 2020
079b979
gardening
eileen-kuehn Feb 12, 2020
420c74e
reversed gardening, sorry
eileen-kuehn Feb 13, 2020
307ba21
fixed calculation of clustering key and reversed pre_job_cluster
eileen-kuehn Feb 13, 2020
bd56e20
shuffling cluster group to remove bias
eileen-kuehn Feb 13, 2020
0f562ee
fixed inversion of rank
tfesenbecker Feb 16, 2020
1562428
job-rank uses non-stable sorting
maxfischer2781 Feb 17, 2020
1efab0d
added fake auto-clusters
maxfischer2781 Feb 17, 2020
6571c7a
added interface for ranked autoclusters
maxfischer2781 Feb 17, 2020
60a582f
fixed signature of copy for RankedAutoClusters
eileen-kuehn Feb 24, 2020
f15937e
added possibility to check for empty drones, closes #92
eileen-kuehn Feb 24, 2020
c802bee
added underscore to ranked_key, as it is unused
eileen-kuehn Feb 24, 2020
4639893
skipping scheduling cycles when drones are all empty
eileen-kuehn Feb 24, 2020
37c38de
unclustered drones are checked for emptiness idnividually
maxfischer2781 Feb 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lapis/drone.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(
pool_resources: dict,
scheduling_duration: float,
ignore_resources: list = None,
empty: callable = lambda drone: False,
):
"""
:param scheduler:
Expand All @@ -41,6 +42,10 @@ def __init__(
self._allocation = None
self._utilisation = None
self._job_queue = Queue()
self._empty = empty

def empty(self):
return self._empty(self)

@property
def theoretical_available_resources(self):
Expand Down Expand Up @@ -143,7 +148,6 @@ async def _run_job(self, job: Job, kill: bool):
except KeyError:
# check is not relevant if the data is not stored
pass
self.scheduler.update_drone(self)
await job_execution.done
except ResourcesUnavailable:
await instant
Expand Down
3 changes: 2 additions & 1 deletion lapis/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Job(object):
"_name",
"drone",
"_success",
"__weakref__",
)

def __init__(
Expand Down Expand Up @@ -83,7 +84,7 @@ def successful(self) -> Optional[bool]:
def waiting_time(self) -> float:
"""
The time the job spent in the simulators scheduling queue. `Inf` when
the job is still waitiing.
the job is still waiting.

:return: Time in queue
"""
Expand Down
5 changes: 2 additions & 3 deletions lapis/monitor/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ def job_statistics(scheduler: CondorJobScheduler) -> List[Dict]:
:return: list of records for logging
"""
result = 0
for cluster in scheduler.drone_cluster.copy():
for drone in cluster:
result += drone.jobs
for drone in scheduler.drone_list:
result += drone.jobs
return [
{
"pool_configuration": "None",
Expand Down
Loading