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

initial implementation of task priorities #3215

Open
wants to merge 22 commits into
base: devel
Choose a base branch
from

Conversation

andre-merzky
Copy link
Member

No description provided.

@andre-merzky andre-merzky self-assigned this Jul 19, 2024
@mtitov mtitov linked an issue Aug 22, 2024 that may be closed by this pull request
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 63.09524% with 31 lines in your changes missing coverage. Please review.

Project coverage is 43.56%. Comparing base (8be5cd2) to head (27a6b1f).

Files with missing lines Patch % Lines
src/radical/pilot/agent/scheduler/base.py 62.65% 31 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3215      +/-   ##
==========================================
+ Coverage   43.51%   43.56%   +0.05%     
==========================================
  Files          96       96              
  Lines       10968    10987      +19     
==========================================
+ Hits         4773     4787      +14     
- Misses       6195     6200       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andre-merzky
Copy link
Member Author

andre-merzky commented Sep 20, 2024

I would not mind getting this merged - the test case passes, tests pass, it fulfills the requested semantics. The use case tests seems to take a bit longer, but I don't think the PR should be held up by that anymore. @mturilli ? @okilic1 ?

Copy link
Contributor

@mtitov mtitov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several small comments

@@ -305,6 +306,12 @@ class TaskDescription(ru.TypedDict):
the tasks did not manage to produce the expected output files to
stage. Default False.

priority: (int, optional): The priority of the task. Tasks with higher
priority will be scheduled first. The default priority is 0.
The task process will not be strictly enforced strictly - under
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo strictly enforced strictly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andre-merzky while fixing this, can you please also remove duplication of PARTITION in both _schema and _defaults

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both done, thanks.

if uid in self._waitpool[priority]:
task = self._waitpool[priority][uid]
to_cancel.append(task)
del self._waitpool[priority][uid]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be break (after del ..) to leave the "priority"-loop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Done

@@ -892,61 +907,70 @@ def _schedule_incoming(self):

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.slot_status("before schedule incoming [%d]" % len(to_schedule))

priority should be considered here - sum of lengths of pools per priority

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Priority for scheduling the tasks to available resources
3 participants