go-livepeer icon indicating copy to clipboard operation
go-livepeer copied to clipboard

Ai video cli endpoint for pool info

Open ad-astra-video opened this issue 1 year ago • 0 comments

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)

  • Add route to webserver.go and handler to handlers.go in server package
  • Including header of "Show-Detail" adds the Orchestrators field to the warm and cold pools. If not included, only the InUse, SizeandSuspended` fields are included in the response.

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:

  • [ ] Read the contribution guide
  • [ ] make runs successfully
  • [ ] All tests in ./test.sh pass
  • [ ] README and other documentation updated
  • [ ] Pending changelog updated

ad-astra-video avatar Apr 29 '24 14:04 ad-astra-video