Skip to content

Productionize K-Means Clustering Model #20

@EndlessReform

Description

@EndlessReform

Description:

Implement the trained k-means clustering model into the production environment so that it can classify new Hacker News posts into existing clusters. The deployment will be part of the existing backend monolith, interfacing with the Triton inference server instances that run the embedding model.
Acceptance Criteria:

Model Load: Implement logic to load the saved k-means model on backend startup.
Inference API: Extend the backend API to expose an endpoint that accepts a new post and returns its cluster ID.
Database Integration: Automatically update the cluster ID in the PostgreSQL database when a new post is processed.
Test Coverage: Add unit tests to verify the clustering model's functionality and integration with existing components.
Performance Metrics: Ensure that the model inference time meets acceptable latency criteria.
Documentation: Update README and inline code documentation to explain how to deploy the new feature.
Monitoring: Implement basic logging to track successful cluster assignments and any inference errors.
Rollback Strategy: Ensure that the system can revert to a prior state if the model proves to be faulty.

Tasks:

Write code to load the k-means model during the backend service startup.
Add an API endpoint for the k-means inference.
Extend the database schema (if necessary) and write code to update cluster IDs.
Write unit tests for the new feature.
Update README and inline code comments.
Review and test the rollback plan.

Depends on a whole bunch of stuff

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions