{"id":20705756,"url":"https://github.com/sustainable-computing-io/kepler-model-server","last_synced_at":"2025-05-08T21:29:56.649Z","repository":{"id":37928480,"uuid":"489132553","full_name":"sustainable-computing-io/kepler-model-server","owner":"sustainable-computing-io","description":"Model Server for Kepler","archived":false,"fork":false,"pushed_at":"2025-04-30T07:30:24.000Z","size":38373,"stargazers_count":27,"open_issues_count":67,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-08T21:29:41.887Z","etag":null,"topics":["machine-learning","model-server","online-machine-learning","prometheus","stream-processing","sustainability","tensorflow","tensorflow-io","tensorflow2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sustainable-computing-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-05T21:36:22.000Z","updated_at":"2025-03-09T17:20:24.000Z","dependencies_parsed_at":"2024-11-08T05:23:58.249Z","dependency_job_id":"9dc75bf2-7b88-4068-a116-7ec3fc5ace94","html_url":"https://github.com/sustainable-computing-io/kepler-model-server","commit_stats":{"total_commits":202,"total_committers":15,"mean_commits":"13.466666666666667","dds":0.4801980198019802,"last_synced_commit":"3930957d4576236b9953f826e2a2c349a75f4933"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sustainable-computing-io%2Fkepler-model-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sustainable-computing-io%2Fkepler-model-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sustainable-computing-io%2Fkepler-model-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sustainable-computing-io%2Fkepler-model-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sustainable-computing-io","download_url":"https://codeload.github.com/sustainable-computing-io/kepler-model-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253153110,"owners_count":21862312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","model-server","online-machine-learning","prometheus","stream-processing","sustainability","tensorflow","tensorflow-io","tensorflow2"],"created_at":"2024-11-17T01:19:36.695Z","updated_at":"2025-05-08T21:29:56.618Z","avatar_url":"https://github.com/sustainable-computing-io.png","language":"Python","readme":"# Kepler Power Model\n\n[Get started with Kepler Model Server.](https://sustainable-computing.io/kepler_model_server/get_started/)\n\nThis repository contains source code related to Kepler power model. The modules in this repository connects to [core Kepler project](https://github.com/sustainable-computing-io/kepler) and [kepler-model-db](https://github.com/sustainable-computing-io/kepler-model-db) as below.\n\n![Diagram](./fig/comm_diagram.png)\n\nFor more details, check [the component diagram](./fig/model-server-components-simplified.png).\n\n## Model server and estimator deployment\n\n### Using Kepler Operator\n\n```yaml\napiVersion: kepler.system.sustainable.computing.io/v1alpha1\nkind: KeplerInternal\nmetadata:\n  name: kepler\nspec:\n..\n  modelServer:\n    enabled: \u003ctrue|false\u003e\n  estimator:\n    node:\n      components:\n        sidecar: \u003ctrue|false\u003e\n        initUrl: \u003cstatic model URL\u003e\n      total:\n        sidecar: \u003ctrue|false\u003e\n        initUrl: \u003cstatic model URL\u003e\n```\n\n### Using manifests with setup script\n\nDeploy with estimator sidecar\n\n```bash\nOPTS=\"ESTIMATOR\" make deploy\n```\n\nDeploy with estimator sidecar and model server\n\n```bash\nOPTS=\"ESTIMATOR SERVER\" make deploy\n```\n\n## Model Training\n\n- [Use Tekton pipeline](./model_training/tekton/README.md)\n\n## Local test\n\n### Via docker\n\n1. Build image for testing, run\n\n    ```bash\n    make build-test\n    ```\n\n2. Run the test\n\n    |Test case|Command|\n    |---|---|\n    |[Training pipeline](./tests/README.md#pipeline)|make test-pipeline|\n    |[Model server](./tests/README.md#estimator-model-request-to-model-server)|make test-model-server|\n    |[Estimator](./tests/README.md#estimator-power-request-from-collector)|make test-estimator|\n    |[Offline Trainer](./tests/README.md#offline-trainer)|make test-offline-trainer|\n\n    For more test information, check [here](./tests/).\n\n### With native python environment\n\nCompatible version: `python 3.10`\n\n1. Install [`hatch`](https://hatch.pypa.io/latest/install/)\n2. Prepare environment\n\n    ```bash\n    hatch shell\n    ```\n\n3. Run the test\n\n| Test case                   | Command                                                                                                                                                                                                                                                                        |\n|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Training pipeline](./tests/README.md#pipeline)| python -u ./tests/pipeline_test.py                                                                                                                                                                                                                                             |\n| [Model server](./tests/README.md#estimator-model-request-to-model-server)| Terminal 1: export MODEL_PATH=$(pwd)/tests/models;python src/server/model_server.py Terminal 2: python -u tests/estimator_model_request_test.py                                                                                                                                |\n| [Estimator](./tests/README.md#estimator-power-request-from-collector) | Terminal 1: python src/estimate/estimator.py Terminal 2: python -u tests/estimator_power_request_test.py                                                                                                                                                                       |\n| Estimator with Model Server | Terminal 1: export MODEL_PATH=$(pwd)/tests/models;python src/server/model_server.py Terminal 2: export MODEL_SERVER_URL=\u003chttp://localhost:8100\u003e;export MODEL_SERVER_ENABLE=true;python -u src/estimate/estimator.py Terminal 3: python -u tests/estimator_power_request_test.py |\n| [Offline Trainer](./tests/README.md#offline-trainer) | Terminal 1: python src/train/offline_trainer.py Terminal 2: python -u tests/offline_trainer_test.py                                                                                                                                                                            |\n\n  For more test information, check [here](./tests/).\n\n### Contributing\n\nPlease check the roadmap and guidelines to join us [here](./contributing.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsustainable-computing-io%2Fkepler-model-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsustainable-computing-io%2Fkepler-model-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsustainable-computing-io%2Fkepler-model-server/lists"}