livepeer / go-livepeer

Official Go implementation of the Livepeer protocol
http://livepeer.org
MIT License
538 stars 168 forks source link

Ai video cli endpoint for pool info #3036

Open ad-astra-video opened 4 months ago

ad-astra-video commented 4 months ago

What does this pull request do? Explain your changes. (required) Adds a cli webserver endpoint /getAIPools to provide some data on warm and cold pools for each selector ( [capability]_[model id] ).

Note that selectors are built after first request for capability/model.

Specific updates (required)

How did you test each of these updates (required)

Added endpoint, requested a AI job and ran: curl -H "Show-Detail: yes" http://127.0.0.1:5935/getAIPools Response: {"27_ByteDance/SDXL-Lightning":{"Cold":{"InUse":0,"Orchestrators":[{"InFlight":0,"Latency":0,"Url":"https://ai-testnet.ad-astra.video:9955"}],"Size":1,"Suspended":2},"Warm":{"InUse":0,"Orchestrators":null,"Size":0,"Suspended":2}}}commits and

Does this pull request close any open issues?

Checklist: