retraining-worker

Analyze Kafka-triggered model retraining workflows with Celery and Redis.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline --skill retraining-worker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: retraining-worker
Source: https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline/tree/main/.claude/skills/retraining-worker
Command: npx skills add https://github.com/GaneshMadarasu/real-time-anomaly-detection-pipeline --skill retraining-worker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains the retraining worker that reacts to drift signals, rebuilds anomaly detection models from recent data, and promotes a better challenger without manual intervention.

Core Features & Use Cases

  • Kafka-triggered retraining: Shows how retraining requests are consumed from the pipeline and dispatched safely to background workers.
  • Celery execution model: Documents the subprocess worker pattern, task retries, and non-blocking dispatch used for model training jobs.
  • Shadow testing and promotion: Covers how the new model is evaluated against the current one, then written to Redis when it performs at least as well.
  • Operational insight: Includes health, metrics, and implementation gotchas such as missing scored events, bootstrap promotion behavior, and process-level metric limitations.

Quick Start

Use the retraining-worker skill to explain how this service receives retraining triggers, trains a challenger model, shadow tests it, and promotes it when it wins.

Frequently Asked Questions about retraining-worker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate model retraining and promotion in an anomaly detection pipeline?

Automate model retraining and promotion by using a Kafka-triggered worker that trains a challenger model and shadow tests it against current performance before promotion. This workflow rebuilds anomaly detection models from recent data without manual intervention.

Can I use Celery for non-blocking model training jobs triggered by Kafka?

Yes, you can use Celery for non-blocking model training jobs triggered by Kafka. The worker uses a subprocess worker pattern with task retries to safely dispatch and execute model training jobs in the background.

How does shadow testing work when promoting a new anomaly detection model?

Shadow testing evaluates the new model against the current one to ensure it performs at least as well. When the challenger model wins the shadow test, it is promoted and written to Redis for version control.

What are the limitations of using Redis and TimescaleDB for model versioning and data access?

Limitations include missing scored events, bootstrap promotion behavior, and process-level metric limitations. The system relies on Redis for model versioning and TimescaleDB for data access, which can affect operational health monitoring.

How do I handle retry logic for failed model retraining tasks?

Handle retry logic for failed model retraining tasks using the Celery execution model. The worker implements task retries and non-blocking dispatch to manage subprocess worker failures safely during the anomaly detection training process.

What is the best way to trigger model retraining when drift is detected?

The best way to trigger model retraining upon drift detection is consuming Kafka events. The retraining worker reacts to drift signals, automatically rebuilding the anomaly detection model from recent data and promoting the challenger.