ML-021: Serving Configuration
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 6m
- Merged PRs (30d)
- 4
Description
# ML-021 — Serving Configuration
## Goal
Integrate model-serving configuration into the platform's existing Pydantic Settings system.
## Description
The serving application must be configurable without modifying application code.
Serving configuration should follow the same configuration conventions already established in the platform.
Configuration should support different environments such as local development, testing, and production.
## Configuration
The serving layer should support configuration for:
* MLflow tracking URI.
* MLflow registry URI.
* Model name.
* Model alias.
* Server host.
* Server port.
* Optional serving environment.
Example:
```text
MLFLOW_TRACKING_URI=sqlite:///mlflow.db
MLFLOW_REGISTRY_URI=sqlite:///mlflow.db
SERVING_MODEL_NAME=f1-predictor
SERVING_MODEL_ALIAS=champion
SERVING_HOST=0.0.0.0
SERVING_PORT=8000
```
## Tasks
* [ ] Extend the existing settings configuration.
* [ ] Add serving model name configuration.
* [ ] Add serving model alias configuration.
* [ ] Add serving host configuration.
* [ ] Add serving port configuration.
* [ ] Reuse existing MLflow configuration.
* [ ] Define sensible defaults where appropriate.
* [ ] Validate configuration values.
* [ ] Ensure environment variables can override defaults.
* [ ] Update `.env.example` if applicable.
* [ ] Add configuration tests.
* [ ] Verify serving components consume settings rather than hardcoded values.
* [ ] Run MyPy.
* [ ] Run Ruff.
## Acceptance Criteria
* [ ] Serving configuration is managed through the existing settings system.
* [ ] Model name can be configured externally.
* [ ] Model alias can be configured externally.
* [ ] Host and port can be configured externally.
* [ ] MLflow configuration is reused rather than duplicated.
* [ ] Environment variables override default values.
* [ ] Invalid configuration produces validation errors.
* [ ] Configuration tests are implemented.
* [ ] No serving configuration is hardcoded in the application.
* [ ] MyPy passes without errors.
* [ ] Ruff passes without errors.
## Definition of Done
* [ ] Configuration implemented.
* [ ] Tests added and passing.
* [ ] Environment configuration documented.
* [ ] MyPy passes.
* [ ] Ruff passes.
* [ ] Changes committed.
Contributor guide
Research direction
Start by locating the existing Pydantic Settings implementation and serving components, then inspect .env.example for current configuration conventions. Add configuration tests covering defaults, environment-variable overrides, and invalid values; verify serving components consume the settings, then run MyPy and Ruff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100