-
Notifications
You must be signed in to change notification settings - Fork 362
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
feat: remove round robin scheduler for agentrm #9493
Conversation
✅ Deploy Preview for determined-ui canceled.
|
@@ -428,7 +428,7 @@ Here is an example master configuration illustrating the potential problem. | |||
resource_manager: | |||
type: agent | |||
scheduler: | |||
type: round_robin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updating example to only use schedulers that still exist
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9493 +/- ##
=======================================
Coverage 48.99% 48.99%
=======================================
Files 1235 1234 -1
Lines 160191 160153 -38
Branches 2780 2781 +1
=======================================
- Hits 78482 78474 -8
+ Misses 81534 81504 -30
Partials 175 175
Flags with carried forward coverage won't be shown. Click here to find out more.
|
f76b2de
to
e5d29d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment but other that, looks good to me
if r.ResourceManager.AgentRM != nil && r.ResourceManager.AgentRM.Scheduler == nil { | ||
r.ResourceManager.AgentRM.Scheduler = DefaultSchedulerConfig() | ||
if r.ResourceManager.AgentRM != nil { | ||
if r.ResourceManager.AgentRM.Scheduler == nil { | ||
r.ResourceManager.AgentRM.Scheduler = DefaultSchedulerConfig() | ||
} | ||
if r.ResourceManager.AgentRM.Scheduler.GetType() == FairShareScheduling { | ||
log.Warn("Fair-Share Scheduler has been deprecated, please update master config to use Priority Scheduler.") | ||
} | ||
if r.ResourceManager.AgentRM.Scheduler.GetType() == RoundRobinScheduling { | ||
log.Error("Round Robin Scheduler has been removed, please update master config to use Priority Scheduler.") | ||
log.Info("Priority Scheduler with all priorities equal will have the same behavior as a Round Robin Scheduler.") | ||
return fmt.Errorf("scheduler not available") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the changes in MakeScheduler
should take care of this right?
I think this would log two warnings if you specified fairshare in the resource manager level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in MakeScheduler
do take care of it, for the most part.
If the resource manger is configured to use round_robin
but all resource pools are configured to use other schedulers (like below), then MakeScheduler
will not complain. Do we care about that (admittedly unlikely) case?
resource_manager:
type: agent
scheduler:
type: round_robin
fitting_policy: best
resource_pools:
- pool_name: pool1
scheduler:
type: fair_share
fitting_policy: best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is probably fine to not handle that case.
Though if we do want to handle that case it would be nice to do it without logging more than expected warnings.
@@ -205,6 +205,7 @@ func (a *agents) createAgent( | |||
|
|||
var poolConfig *config.ResourcePoolConfig | |||
for _, pc := range a.poolConfigs { | |||
// The address of a loop variable is always the same. Use a temporary variable to capture the address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is no longer the case in Go 1.22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make -C master check
complained when I removed pc := pc
. I can remove the comment, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think changes are fine as is
if r.ResourceManager.AgentRM != nil && r.ResourceManager.AgentRM.Scheduler == nil { | ||
r.ResourceManager.AgentRM.Scheduler = DefaultSchedulerConfig() | ||
if r.ResourceManager.AgentRM != nil { | ||
if r.ResourceManager.AgentRM.Scheduler == nil { | ||
r.ResourceManager.AgentRM.Scheduler = DefaultSchedulerConfig() | ||
} | ||
if r.ResourceManager.AgentRM.Scheduler.GetType() == FairShareScheduling { | ||
log.Warn("Fair-Share Scheduler has been deprecated, please update master config to use Priority Scheduler.") | ||
} | ||
if r.ResourceManager.AgentRM.Scheduler.GetType() == RoundRobinScheduling { | ||
log.Error("Round Robin Scheduler has been removed, please update master config to use Priority Scheduler.") | ||
log.Info("Priority Scheduler with all priorities equal will have the same behavior as a Round Robin Scheduler.") | ||
return fmt.Errorf("scheduler not available") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is probably fine to not handle that case.
Though if we do want to handle that case it would be nice to do it without logging more than expected warnings.
Ticket
RM-322
Description
Remove round robin scheduler for agent resource managers. Deprecation announced in 0.33.0.
Test Plan
None needed.
Checklist
docs/release-notes/
.See Release Note for details.