Closed rickstaa closed 4 months ago
@yondonfu, I've tested this pull request and found that it significantly improves the situation. However, please feel free to provide feedback if this doesn't align with your expectations.
The current implementation isn't yet perfect, as it suspends the stake-based selection formula once latencies for all orchestrators are known. To address this, we might enhance the process by modifying the MinLSSelector
to prioritize the fastest 30% and implement a weight-based selection algorithm accordingly. For more details, refer to the discussion at: update-minlsselector-to-select-known-os-based-on-regular-selection.
What does this pull request do? Explain your changes. (required)
This pull request, done in collaboration with @ad-astra-video, introduces latency consideration into the orchestrator selection process, addressing two key issues. Firstly, it resolves a minor bug where the algorithm consistently selected known orchestrators due to a condition that never evaluated to true (see this condition). Secondly, this change ensures that, once all orchestrators have been evaluated, the one with the fastest response time for a specific job is chosen. While the current method for calculating latency is somewhat basic, it sets the foundation for more sophisticated enhancements in the future.
Specific updates (required)
How did you test each of these updates (required)
Does this pull request close any open issues?
https://linear.app/livepeer-ai-spe/issue/LIV-302/selection-algorithm-sticks-to-known-sessions-after-one-has-been-found
Remarks
The latency calculation formula is a bit naive but it seems to work for the current piplines it howver might be needed to improved when schedulers or other pipeline tools are added.
Checklist:
make
runs successfully./test.sh
pass