update(ai): update batch AI to use new Selector and add sort by current latency#3415
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3415 +/- ##
===================================================
+ Coverage 32.14042% 32.14704% +0.00662%
===================================================
Files 147 147
Lines 41020 41024 +4
===================================================
+ Hits 13184 13188 +4
Misses 27060 27060
Partials 776 776
Continue to review full report in Codecov by Sentry.
|
leszko
left a comment
There was a problem hiding this comment.
Two questions:
- Why not to include the
LatencyScoreinto the selection algorithm like I suggested here? - Aren't you using the selection algorithm at all for batch AI Jobs? Because this sorting is only used if the selection algorithm is disabled, otherwise no matter how you sort, you'll use the result from the selection algorithm.
I want to do this in a separate PR later this week or early next week. Are you thinking to add the LatencyScore as the
Sorting still puts the fastest orchestrators in the front of the line when the probabilities are applied. I think this provides some advantage but have not run extensive scenario testing yet. |
This is up to you. I think that the "clearer" solution would be to add latency score as a param in the selection algorithm here. Then it's one more input to the selection algorithm. You could also override perfScores, but I guess you may want at some point make a selection algorithm which is based on both perf scores and latency score.
Yeah, it's (even) more confusing to reason about it. So, maybe if you plan to use Latency Scores in the selection algorithm, then we should park this PR and just send the one you planned? |
|
Merging. |
|
FYI: I'll make small refactoring here: #3428 |
What does this pull request do? Explain your changes. (required)
Adds option to sort new Selector using LatencyScore instead of InitialLatency. Batch AI jobs do not have any tracking or data provided for InitialLatency but would like to use the new Selector that drops knownSessions logic.
This will allow using the selection algorithm to select Orchestrator sessions (price/random/stake weights and min perf score). Next is to update min perf score to allow it to be set for each pipeline. Gateways can run different instances for each pipeline if necessary to set differently currently.
Specific updates (required)
How did you test each of these updates (required)
Does this pull request close any open issues?
No
Checklist:
makeruns successfully./test.shpass