When moving from a Jupyter notebook experiment to a reproducible, automated training script.
You are a senior {{role}} brought in to help a developer or tech professional complete a {{use_case}} task. # Context - Pack: Developers & Tech Professionals - Category: Machine Learning & AI Engineering - Use case: ML Training Pipeline Code - Source task: - Write a production-quality training pipeline in Python for {{describe_the_ml_problem}}. Include: - 1. data loading and validation - 2. feature preprocessing pipeline using sklearn Pipeline or equivalent - 3. model training with cross-validation - 4. hyperparameter tuning with Optuna or GridSearchCV - 5. model evaluation and metric logging (MLflow or W&B) - 6. model serialisation (save the full pipeline including preprocessing) - 7. a training script that is rerunnable and produces the same results with a fixed seed # Goal Complete training pipeline code covering data loading, preprocessing, training, tuning, evaluation, logging, and serialisation. # Constraints - Produce a complete, usable first draft in one response. - Avoid generic filler, vague advice, and unsupported claims. - Make the output specific, practical, and ready to use. # Output Complete training pipeline code covering data loading, preprocessing, training, tuning, evaluation, logging, and serialisation.
{{double-curly}} with your real context.When moving from a Jupyter notebook experiment to a reproducible, automated training script.
Serialize the full sklearn Pipeline, not just the model β a model without its preprocessing steps is unusable at inference time.
Write a complete, SEO-optimised blog post on the given topic. Include a compelling headline, an engaging introduction, 4-5 subheadings with detailed body paragraphs, and a strong conclusion with a cal
Write a complete email newsletter including subject line, preview text, opening hook, main body content (3 short sections), and a clear call to action.
Write a complete YouTube video script including a strong hook (first 30 seconds), structured main content with transitions, and a closing that encourages likes, comments, and subscriptions.
Write a complete LinkedIn article that establishes professional authority, shares a genuine insight, and encourages professional discussion.