-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
kind/featureNew feature or requestNew feature or request
Description
What would you like to be added?
Currently we have this project https://github.com/sustainable-computing-io/kepler-model-server based in Python that does many things....
Some of that belongs in Python - i.e training or anything that uses numpy - however there are elements of this codebase that would be useful to have in Go form.
What I would propose is:
- Create an OpenAPI spec for the API used for model server
- Create an
pkg/model-server-apithat implements this API - Generate
pkg/model-server-clientfrom the OpenAPI spec - this would be used by thepkg/modelinferencing code. - Create
pkg/model-db- which handles interactions with kepler model db - Create
cmd/model-severthe actual binary that serves the API
This would then leave the functionality of the estimator and online-trainer in Python since the model pipelines should not need to change. These can either remain in Python, and the REST API from the model server can be adjusted appropriately.
OR
We can call them using Cython from the Go code 🤯 See: https://poweruser.blog/embedding-python-in-go-338c0399f3d5
Why is this needed?
- The in-tree models that are used in Kepler can be removed 🎉
cmd/exportercan usepkg/kepler-model-dbto download the latest models if none are in the correct path - CPU detection logic in Kepler can be used more easily to select the correct model
- Type safe API bindings mean less bugs
- We can more easily integration test these 2 binaries
- Easier packaging and shipping of the model server
- Code sharing and re-use between kepler-exporter standalone and kepler-exporter + kepler-model-server
Metadata
Metadata
Assignees
Labels
kind/featureNew feature or requestNew feature or request