Ai video cli endpoint for pool info
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
Orchestratorsfield to the warm and cold pools. If not included, only theInUse, 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
- [ ]
makeruns successfully - [ ] All tests in
./test.shpass - [ ] README and other documentation updated
- [ ] Pending changelog updated