[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QT4HPX3A1BQM3EE2P22CT9":3,"skill-same:01M6QT4HPX3A1BQM3EE2P22CT9":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6QT4HPX3A1BQM3EE2P22CT9","ml-pipeline-automation",null,"Automate ML workflows with Airflow, Kubeflow, MLflow. Use for reproducible pipelines, retraining schedules, MLOps, or encountering task failures, dependency errors, experiment tracking issues.","VRIL-LABS\u002Fskill-jam","VRIL-LABS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272046472?v=4","01M6QR9PNWM28WZYJJASER1RG2","𝗩𝗥𝗜𝗟 𝗟𝗔𝗕𝗦","01M6QR9PT6Q6JDCQ97EQBDX6E4",2,"MIT","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"pipeline","ml pipeline automation","ml pipeline","ml","automation","workflows","training","issues","data pipeline","monitoring","dag","model","drift","workflow","retries","Experiment Tracking","Model Registry","Model Versioning","errors","orchestration","2026-11-10 10:12:30",false,"---\nname: ml-pipeline-automation\ndescription: Automate ML workflows with Airflow, Kubeflow, MLflow. Use for reproducible pipelines, retraining schedules, MLOps, or encountering task failures, dependency errors, experiment tracking issues.\nkeywords: ML pipeline, Airflow, Kubeflow, MLflow, MLOps, workflow orchestration, data pipeline, model training automation, experiment tracking, model registry, Airflow DAG, task dependencies, pipeline monitoring, data quality, drift detection, hyperparameter tuning, model versioning, artifact management, Kubeflow Pipelines, pipeline automation, retries, sensors\nlicense: MIT\n---\n\n# ML Pipeline Automation\n\nOrchestrate end-to-end machine learning workflows from data ingestion to production deployment with production-tested Airflow, Kubeflow, and MLflow patterns.\n\n## When to Use This Skill\n\nLoad this skill when:\n- **Building ML Pipelines**: Orchestrating data → train → deploy workflows\n- **Scheduling Retraining**: Setting up automated model retraining schedules\n- **Experiment Tracking**: Tracking experiments, parameters, metrics across runs\n- **MLOps Implementation**: Building reproducible, monitored ML infrastructure\n- **Workflow Orchestration**: Managing complex multi-step ML workflows\n- **Model Registry**: Managing model versions and deployment lifecycle\n\n## Quick Start: ML Pipeline in 5 Steps\n\n```bash\n# 1. Install Airflow and MLflow (check for latest versions at time of use)\npip install apache-airflow==3.1.5 mlflow==3.7.0\n\n# Note: These versions are current as of December 2025\n# Check PyPI for latest stable releases: https:\u002F\u002Fpypi.org\u002Fproject\u002Fapache-airflow\u002F\n\n# 2. Initialize Airflow database\nairflow db init\n\n# 3. Create DAG file: dags\u002Fml_training_pipeline.py\ncat > dags\u002Fml_training_pipeline.py \u003C\u003C 'EOF'\nfrom airflow import DAG\nfrom airflow.operators.python import PythonOperator\nfrom datetime import datetime, timedelta\n\ndefault_args = {\n    'owner': 'ml-team',\n    'retries': 2,\n    'retry_delay': timedelta(minutes=5)\n}\n\ndag = DAG(\n    'ml_training_pipeline',\n    default_args=default_args,\n    schedule_interval='@daily',\n    start_date=datetime(2025, 1, 1)\n)\n\ndef train_model(**context):\n    import mlflow\n    import mlflow.sklearn\n    from sklearn.ensemble import RandomForestClassifier\n    from sklearn.datasets import load_iris\n    from sklearn.model_selection import train_test_split\n\n    X, y = load_iris(return_X_y=True)\n    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n\n    mlflow.set_tracking_uri('http:\u002F\u002Flocalhost:5000')\n    mlflow.set_experiment('iris-training')\n\n    with mlflow.start_run():\n        model = RandomForestClassifier(n_estimators=100)\n        model.fit(X_train, y_train)\n\n        accuracy = model.score(X_test, y_test)\n        mlflow.log_metric('accuracy', accuracy)\n        mlflow.sklearn.log_model(model, 'model')\n\ntrain = PythonOperator(\n    task_id='train_model',\n    python_callable=train_model,\n    dag=dag\n)\nEOF\n\n# 4. Start Airflow scheduler and webserver\nairflow scheduler &\nairflow webserver --port 8080 &\n\n# 5. Trigger pipeline\nairflow dags trigger ml_training_pipeline\n\n# Access UI: http:\u002F\u002Flocalhost:8080\n```\n\n**Result**: Working ML pipeline with experiment tracking in under 5 minutes.\n\n## Core Concepts\n\n### Pipeline Stages\n\n1. **Data Collection** → Fetch raw data from sources\n2. **Data Validation** → Check schema, quality, distributions\n3. **Feature Engineering** → Transform raw data to features\n4. **Model Training** → Train with hyperparameter tuning\n5. **Model Evaluation** → Validate performance on test set\n6. **Model Deployment** → Push to production if metrics pass\n7. **Monitoring** → Track drift, performance in production\n\n### Orchestration Tools Comparison\n\n| Tool | Best For | Strengths |\n|------|----------|-----------|\n| **Airflow** | General ML workflows | Mature, flexible, Python-native |\n| **Kubeflow** | Kubernetes-native ML | Container-based, scalable |\n| **MLflow** | Experiment tracking | Model registry, versioning |\n| **Prefect** | Modern Python workflows | Dynamic DAGs, native caching |\n| **Dagster** | Asset-oriented pipelines | Data-aware, testable |\n\n## Basic Airflow DAG\n\n```python\nfrom airflow import DAG\nfrom airflow.operators.python import PythonOperator\nfrom datetime import datetime, timedelta\nimport logging\n\nlogger = logging.getLogger(__name__)\n\ndefault_args = {\n    'owner': 'ml-team',\n    'depends_on_past': False,\n    'email': ['alerts@example.com'],\n    'email_on_failure': True,\n    'retries': 2,\n    'retry_delay': timedelta(minutes=5)\n}\n\ndag = DAG(\n    'ml_training_pipeline',\n    default_args=default_args,\n    description='End-to-end ML training pipeline',\n    schedule_interval='@daily',\n    start_date=datetime(2025, 1, 1),\n    catchup=False\n)\n\ndef validate_data(**context):\n    \"\"\"Validate input data quality.\"\"\"\n    import pandas as pd\n\n    data_path = \"\u002Fdata\u002Fraw\u002Flatest.csv\"\n    df = pd.read_csv(data_path)\n\n    # Validation checks\n    assert len(df) > 1000, f\"Insufficient data: {len(df)} rows\"\n    assert df.isnull().sum().sum() \u003C len(df) * 0.1, \"Too many nulls\"\n\n    context['ti'].xcom_push(key='data_path', value=data_path)\n    logger.info(f\"Data validation passed: {len(df)} rows\")\n\ndef train_model(**context):\n    \"\"\"Train ML model with MLflow tracking.\"\"\"\n    import mlflow\n    import mlflow.sklearn\n    from sklearn.ensemble import RandomForestClassifier\n\n    data_path = context['ti'].xcom_pull(key='data_path', task_ids='validate_data')\n\n    mlflow.set_tracking_uri('http:\u002F\u002Fmlflow:5000')\n    mlflow.set_experiment('production-training')\n\n    with mlflow.start_run():\n        # Training logic here\n        model = RandomForestClassifier(n_estimators=100)\n        # model.fit(X, y) ...\n\n        mlflow.log_param('n_estimators', 100)\n        mlflow.sklearn.log_model(model, 'model')\n\nvalidate = PythonOperator(\n    task_id='validate_data',\n    python_callable=validate_data,\n    dag=dag\n)\n\ntrain = PythonOperator(\n    task_id='train_model',\n    python_callable=train_model,\n    dag=dag\n)\n\nvalidate >> train\n```\n\n## Known Issues Prevention\n\n### 1. Task Failures Without Alerts\n**Problem**: Pipeline fails silently, no one notices until users complain.\n\n**Solution**: Configure email\u002FSlack alerts on failure:\n```python\ndefault_args = {\n    'email': ['ml-team@example.com'],\n    'email_on_failure': True,\n    'email_on_retry': False\n}\n\ndef on_failure_callback(context):\n    \"\"\"Send Slack alert on failure.\"\"\"\n    from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator\n\n    slack_msg = f\"\"\"\n    :red_circle: Task Failed: {context['task_instance'].task_id}\n    DAG: {context['task_instance'].dag_id}\n    Execution Date: {context['ds']}\n    Error: {context.get('exception')}\n    \"\"\"\n\n    SlackWebhookOperator(\n        task_id='slack_alert',\n        slack_webhook_conn_id='slack_webhook',\n        message=slack_msg\n    ).execute(context)\n\ntask = PythonOperator(\n    task_id='critical_task',\n    python_callable=my_function,\n    on_failure_callback=on_failure_callback,\n    dag=dag\n)\n```\n\n### 2. Missing XCom Data Between Tasks\n**Problem**: Task expects XCom value from previous task, gets None, crashes.\n\n**Solution**: Always validate XCom pulls:\n```python\ndef process_data(**context):\n    data_path = context['ti'].xcom_pull(\n        key='data_path',\n        task_ids='upstream_task'\n    )\n\n    if data_path is None:\n        raise ValueError(\"No data_path from upstream_task - check XCom push\")\n\n    # Process data...\n```\n\n### 3. DAG Not Appearing in UI\n**Problem**: DAG file exists in `dags\u002F` but doesn't show in Airflow UI.\n\n**Solution**: Check DAG parsing errors:\n```bash\n# Check for syntax errors\npython dags\u002Fmy_dag.py\n\n# View DAG import errors in UI\n# Navigate to: Browse → DAG Import Errors\n\n# Common fixes:\n# 1. Ensure DAG object is defined in file\n# 2. Check for circular imports\n# 3. Verify all dependencies installed\n# 4. Fix syntax errors\n```\n\n### 4. Hardcoded Paths Break in Production\n**Problem**: Paths like `\u002FUsers\u002Fmyname\u002Fdata\u002F` work locally, fail in production.\n\n**Solution**: Use Airflow Variables or environment variables:\n```python\nfrom airflow.models import Variable\n\ndef load_data(**context):\n    # ❌ Bad: Hardcoded path\n    # data_path = \"\u002FUsers\u002Fmyname\u002Fdata\u002Ftrain.csv\"\n\n    # ✅ Good: Use Airflow Variable\n    data_dir = Variable.get(\"data_directory\", \"\u002Fdata\")\n    data_path = f\"{data_dir}\u002Ftrain.csv\"\n\n    # Or use environment variable\n    import os\n    data_path = os.getenv(\"DATA_PATH\", \"\u002Fdata\u002Ftrain.csv\")\n```\n\n### 5. Stuck Tasks Consume Resources\n**Problem**: Task hangs indefinitely, blocks worker slot, wastes resources.\n\n**Solution**: Set execution_timeout on tasks:\n```python\nfrom datetime import timedelta\n\ntask = PythonOperator(\n    task_id='long_running_task',\n    python_callable=my_function,\n    execution_timeout=timedelta(hours=2),  # Kill after 2 hours\n    dag=dag\n)\n```\n\n### 6. No Data Validation = Bad Model Training\n**Problem**: Train on corrupted\u002Fincomplete data, model performs poorly in production.\n\n**Solution**: Add data quality validation tasks:\n```python\ndef validate_data_quality(**context):\n    \"\"\"Comprehensive data validation.\"\"\"\n    import pandas as pd\n\n    df = pd.read_csv(data_path)\n\n    # Schema validation\n    required_cols = ['user_id', 'timestamp', 'feature_a', 'target']\n    missing_cols = set(required_cols) - set(df.columns)\n    if missing_cols:\n        raise ValueError(f\"Missing columns: {missing_cols}\")\n\n    # Statistical validation\n    if df['target'].isnull().sum() > 0:\n        raise ValueError(\"Target column contains nulls\")\n\n    if len(df) \u003C 1000:\n        raise ValueError(f\"Insufficient data: {len(df)} rows\")\n\n    logger.info(\"✅ Data quality validation passed\")\n```\n\n### 7. Untracked Experiments = Lost Knowledge\n**Problem**: Can't reproduce results, don't know which hyperparameters worked.\n\n**Solution**: Use MLflow for all experiments:\n```python\nimport mlflow\n\nmlflow.set_tracking_uri('http:\u002F\u002Fmlflow:5000')\nmlflow.set_experiment('model-experiments')\n\nwith mlflow.start_run(run_name='rf_v1'):\n    # Log ALL hyperparameters\n    mlflow.log_params({\n        'model_type': 'random_forest',\n        'n_estimators': 100,\n        'max_depth': 10,\n        'random_state': 42\n    })\n\n    # Log ALL metrics\n    mlflow.log_metrics({\n        'train_accuracy': 0.95,\n        'test_accuracy': 0.87,\n        'f1_score': 0.89\n    })\n\n    # Log model\n    mlflow.sklearn.log_model(model, 'model')\n```\n\n## When to Load References\n\nLoad reference files for detailed production implementations:\n\n- **Airflow DAG Patterns**: Load `references\u002Fairflow-patterns.md` when building complex DAGs with error handling, dynamic generation, sensors, task groups, or retry logic. Contains complete production DAG examples.\n\n- **Kubeflow & MLflow Integration**: Load `references\u002Fkubeflow-mlflow.md` when using Kubeflow Pipelines for container-native orchestration, integrating MLflow tracking, building KFP components, or managing model registry.\n\n- **Pipeline Monitoring**: Load `references\u002Fpipeline-monitoring.md` when implementing data quality checks, drift detection, alert configuration, or pipeline health monitoring with Prometheus.\n\n## Best Practices\n\n1. **Idempotent Tasks**: Tasks should produce same result when re-run\n2. **Atomic Operations**: Each task does one thing well\n3. **Version Everything**: Data, code, models, dependencies\n4. **Comprehensive Logging**: Log all important events with context\n5. **Error Handling**: Fail fast with clear error messages\n6. **Monitoring**: Track pipeline health, data quality, model drift\n7. **Testing**: Test tasks independently before integrating\n8. **Documentation**: Document DAG purpose, task dependencies\n\n## Common Patterns\n\n### Conditional Execution\n```python\nfrom airflow.operators.python import BranchPythonOperator\n\ndef choose_branch(**context):\n    accuracy = context['ti'].xcom_pull(key='accuracy', task_ids='evaluate')\n\n    if accuracy > 0.9:\n        return 'deploy_to_production'\n    else:\n        return 'retrain_with_more_data'\n\nbranch = BranchPythonOperator(\n    task_id='check_accuracy',\n    python_callable=choose_branch,\n    dag=dag\n)\n\ntrain >> evaluate >> branch >> [deploy, retrain]\n```\n\n### Parallel Training\n```python\nfrom airflow.utils.task_group import TaskGroup\n\nwith TaskGroup('train_models', dag=dag) as train_group:\n    train_rf = PythonOperator(task_id='train_rf', ...)\n    train_lr = PythonOperator(task_id='train_lr', ...)\n    train_xgb = PythonOperator(task_id='train_xgb', ...)\n\n# All models train in parallel\npreprocess >> train_group >> select_best\n```\n\n### Waiting for Data\n```python\nfrom airflow.sensors.filesystem import FileSensor\n\nwait_for_data = FileSensor(\n    task_id='wait_for_data',\n    filepath='\u002Fdata\u002Finput\u002F{{ ds }}.csv',\n    poke_interval=60,  # Check every 60 seconds\n    timeout=3600,  # Timeout after 1 hour\n    mode='reschedule',  # Don't block worker\n    dag=dag\n)\n\nwait_for_data >> process_data\n```\n","# ML Pipeline Automation\n\nOrchestrate end-to-end machine learning workflows from data ingestion to production deployment with production-tested Airflow, Kubeflow, and MLflow patterns.\n\n## When to Use This Skill\n\nLoad this skill when:\n- **Building ML Pipelines**: Orchestrating data → train → deploy workflows\n- **Scheduling Retraining**: Setting up automated model retraining schedules\n- **Experiment Tracking**: Tracking experiments, parameters, metrics across runs\n- **MLOps Implementation**: Building reproducible, monitored ML infrastructure\n- **Workflow Orchestration**: Managing complex multi-step ML workflows\n- **Model Registry**: Managing model versions and deployment lifecycle\n\n## Quick Start: ML Pipeline in 5 Steps\n\n```bash\n# 1. Install Airflow and MLflow (check for latest versions at time of use)\npip install apache-airflow==3.1.5 mlflow==3.7.0\n\n# Note: These versions are current as of December 2025\n# Check PyPI for latest stable releases: https:\u002F\u002Fpypi.org\u002Fproject\u002Fapache-airflow\u002F\n\n# 2. Initialize Airflow database\nairflow db init\n\n# 3. Create DAG file: dags\u002Fml_training_pipeline.py\ncat > dags\u002Fml_training_pipeline.py \u003C\u003C 'EOF'\nfrom airflow import DAG\nfrom airflow.operators.python import PythonOperator\nfrom datetime import datetime, timedelta\n\ndefault_args = {\n    'owner': 'ml-team',\n    'retries': 2,\n    'retry_delay': timedelta(minutes=5)\n}\n\ndag = DAG(\n    'ml_training_pipeline',\n    default_args=default_args,\n    schedule_interval='@daily',\n    start_date=datetime(2025, 1, 1)\n)\n\ndef train_model(**context):\n    import mlflow\n    import mlflow.sklearn\n    from sklearn.ensemble import RandomForestClassifier\n    from sklearn.datasets import load_iris\n    from sklearn.model_selection import train_test_split\n\n    X, y = load_iris(return_X_y=True)\n    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)\n\n    mlflow.set_tracking_uri('http:\u002F\u002Flocalhost:5000')\n    mlflow.set_experiment('iris-training')\n\n    with mlflow.start_run():\n        model = RandomForestClassifier(n_estimators=100)\n        model.fit(X_train, y_train)\n\n        accuracy = model.score(X_test, y_test)\n        mlflow.log_metric('accuracy', accuracy)\n        mlflow.sklearn.log_model(model, 'model')\n\ntrain = PythonOperator(\n    task_id='train_model',\n    python_callable=train_model,\n    dag=dag\n)\nEOF\n\n# 4. Start Airflow scheduler and webserver\nairflow scheduler &\nairflow webserver --port 8080 &\n\n# 5. Trigger pipeline\nairflow dags trigger ml_training_pipeline\n\n# Access UI: http:\u002F\u002Flocalhost:8080\n```\n\n**Result**: Working ML pipeline with experiment tracking in under 5 minutes.\n\n## Core Concepts\n\n### Pipeline Stages\n\n1. **Data Collection** → Fetch raw data from sources\n2. **Data Validation** → Check schema, quality, distributions\n3. **Feature Engineering** → Transform raw data to features\n4. **Model Training** → Train with hyperparameter tuning\n5. **Model Evaluation** → Validate performance on test set\n6. **Model Deployment** → Push to production if metrics pass\n7. **Monitoring** → Track drift, performance in production\n\n### Orchestration Tools Comparison\n\n| Tool | Best For | Strengths |\n|------|----------|-----------|\n| **Airflow** | General ML workflows | Mature, flexible, Python-native |\n| **Kubeflow** | Kubernetes-native ML | Container-based, scalable |\n| **MLflow** | Experiment tracking | Model registry, versioning |\n| **Prefect** | Modern Python workflows | Dynamic DAGs, native caching |\n| **Dagster** | Asset-oriented pipelines | Data-aware, testable |\n\n## Basic Airflow DAG\n\n```python\nfrom airflow import DAG\nfrom airflow.operators.python import PythonOperator\nfrom datetime import datetime, timedelta\nimport logging\n\nlogger = logging.getLogger(__name__)\n\ndefault_args = {\n    'owner': 'ml-team',\n    'depends_on_past': False,\n    'email': ['alerts@example.com'],\n    'email_on_failure': True,\n    'retries': 2,\n    'retry_delay': timedelta(minutes=5)\n}\n\ndag = DAG(\n    'ml_training_pipeline',\n    default_args=default_args,\n    description='End-to-end ML training pipeline',\n    schedule_interval='@daily',\n    start_date=datetime(2025, 1, 1),\n    catchup=False\n)\n\ndef validate_data(**context):\n    \"\"\"Validate input data quality.\"\"\"\n    import pandas as pd\n\n    data_path = \"\u002Fdata\u002Fraw\u002Flatest.csv\"\n    df = pd.read_csv(data_path)\n\n    # Validation checks\n    assert len(df) > 1000, f\"Insufficient data: {len(df)} rows\"\n    assert df.isnull().sum().sum() \u003C len(df) * 0.1, \"Too many nulls\"\n\n    context['ti'].xcom_push(key='data_path', value=data_path)\n    logger.info(f\"Data validation passed: {len(df)} rows\")\n\ndef train_model(**context):\n    \"\"\"Train ML model with MLflow tracking.\"\"\"\n    import mlflow\n    import mlflow.sklearn\n    from sklearn.ensemble import RandomForestClassifier\n\n    data_path = context['ti'].xcom_pull(key='data_path', task_ids='validate_data')\n\n    mlflow.set_tracking_uri('http:\u002F\u002Fmlflow:5000')\n    mlflow.set_experiment('production-training')\n\n    with mlflow.start_run():\n        # Training logic here\n        model = RandomForestClassifier(n_estimators=100)\n        # model.fit(X, y) ...\n\n        mlflow.log_param('n_estimators', 100)\n        mlflow.sklearn.log_model(model, 'model')\n\nvalidate = PythonOperator(\n    task_id='validate_data',\n    python_callable=validate_data,\n    dag=dag\n)\n\ntrain = PythonOperator(\n    task_id='train_model',\n    python_callable=train_model,\n    dag=dag\n)\n\nvalidate >> train\n```\n\n## Known Issues Prevention\n\n### 1. Task Failures Without Alerts\n**Problem**: Pipeline fails silently, no one notices until users complain.\n\n**Solution**: Configure email\u002FSlack alerts on failure:\n```python\ndefault_args = {\n    'email': ['ml-team@example.com'],\n    'email_on_failure': True,\n    'email_on_retry': False\n}\n\ndef on_failure_callback(context):\n    \"\"\"Send Slack alert on failure.\"\"\"\n    from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator\n\n    slack_msg = f\"\"\"\n    :red_circle: Task Failed: {context['task_instance'].task_id}\n    DAG: {context['task_instance'].dag_id}\n    Execution Date: {context['ds']}\n    Error: {context.get('exception')}\n    \"\"\"\n\n    SlackWebhookOperator(\n        task_id='slack_alert',\n        slack_webhook_conn_id='slack_webhook',\n        message=slack_msg\n    ).execute(context)\n\ntask = PythonOperator(\n    task_id='critical_task',\n    python_callable=my_function,\n    on_failure_callback=on_failure_callback,\n    dag=dag\n)\n```\n\n### 2. Missing XCom Data Between Tasks\n**Problem**: Task expects XCom value from previous task, gets None, crashes.\n\n**Solution**: Always validate XCom pulls:\n```python\ndef process_data(**context):\n    data_path = context['ti'].xcom_pull(\n        key='data_path',\n        task_ids='upstream_task'\n    )\n\n    if data_path is None:\n        raise ValueError(\"No data_path from upstream_task - check XCom push\")\n\n    # Process data...\n```\n\n### 3. DAG Not Appearing in UI\n**Problem**: DAG file exists in `dags\u002F` but doesn't show in Airflow UI.\n\n**Solution**: Check DAG parsing errors:\n```bash\n# Check for syntax errors\npython dags\u002Fmy_dag.py\n\n# View DAG import errors in UI\n# Navigate to: Browse → DAG Import Errors\n\n# Common fixes:\n# 1. Ensure DAG object is defined in file\n# 2. Check for circular imports\n# 3. Verify all dependencies installed\n# 4. Fix syntax errors\n```\n\n### 4. Hardcoded Paths Break in Production\n**Problem**: Paths like `\u002FUsers\u002Fmyname\u002Fdata\u002F` work locally, fail in production.\n\n**Solution**: Use Airflow Variables or environment variables:\n```python\nfrom airflow.models import Variable\n\ndef load_data(**context):\n    # ❌ Bad: Hardcoded path\n    # data_path = \"\u002FUsers\u002Fmyname\u002Fdata\u002Ftrain.csv\"\n\n    # ✅ Good: Use Airflow Variable\n    data_dir = Variable.get(\"data_directory\", \"\u002Fdata\")\n    data_path = f\"{data_dir}\u002Ftrain.csv\"\n\n    # Or use environment variable\n    import os\n    data_path = os.getenv(\"DATA_PATH\", \"\u002Fdata\u002Ftrain.csv\")\n```\n\n### 5. Stuck Tasks Consume Resources\n**Problem**: Task hangs indefinitely, blocks worker slot, wastes resources.\n\n**Solution**: Set execution_timeout on tasks:\n```python\nfrom datetime import timedelta\n\ntask = PythonOperator(\n    task_id='long_running_task',\n    python_callable=my_function,\n    execution_timeout=timedelta(hours=2),  # Kill after 2 hours\n    dag=dag\n)\n```\n\n### 6. No Data Validation = Bad Model Training\n**Problem**: Train on corrupted\u002Fincomplete data, model performs poorly in production.\n\n**Solution**: Add data quality validation tasks:\n```python\ndef validate_data_quality(**context):\n    \"\"\"Comprehensive data validation.\"\"\"\n    import pandas as pd\n\n    df = pd.read_csv(data_path)\n\n    # Schema validation\n    required_cols = ['user_id', 'timestamp', 'feature_a', 'target']\n    missing_cols = set(required_cols) - set(df.columns)\n    if missing_cols:\n        raise ValueError(f\"Missing columns: {missing_cols}\")\n\n    # Statistical validation\n    if df['target'].isnull().sum() > 0:\n        raise ValueError(\"Target column contains nulls\")\n\n    if len(df) \u003C 1000:\n        raise ValueError(f\"Insufficient data: {len(df)} rows\")\n\n    logger.info(\"✅ Data quality validation passed\")\n```\n\n### 7. Untracked Experiments = Lost Knowledge\n**Problem**: Can't reproduce results, don't know which hyperparameters worked.\n\n**Solution**: Use MLflow for all experiments:\n```python\nimport mlflow\n\nmlflow.set_tracking_uri('http:\u002F\u002Fmlflow:5000')\nmlflow.set_experiment('model-experiments')\n\nwith mlflow.start_run(run_name='rf_v1'):\n    # Log ALL hyperparameters\n    mlflow.log_params({\n        'model_type': 'random_forest',\n        'n_estimators': 100,\n        'max_depth': 10,\n        'random_state': 42\n    })\n\n    # Log ALL metrics\n    mlflow.log_metrics({\n        'train_accuracy': 0.95,\n        'test_accuracy': 0.87,\n        'f1_score': 0.89\n    })\n\n    # Log model\n    mlflow.sklearn.log_model(model, 'model')\n```\n\n## When to Load References\n\nLoad reference files for detailed production implementations:\n\n- **Airflow DAG Patterns**: Load `references\u002Fairflow-patterns.md` when building complex DAGs with error handling, dynamic generation, sensors, task groups, or retry logic. Contains complete production DAG examples.\n\n- **Kubeflow & MLflow Integration**: Load `references\u002Fkubeflow-mlflow.md` when using Kubeflow Pipelines for container-native orchestration, integrating MLflow tracking, building KFP components, or managing model registry.\n\n- **Pipeline Monitoring**: Load `references\u002Fpipeline-monitoring.md` when implementing data quality checks, drift detection, alert configuration, or pipeline health monitoring with Prometheus.\n\n## Best Practices\n\n1. **Idempotent Tasks**: Tasks should produce same result when re-run\n2. **Atomic Operations**: Each task does one thing well\n3. **Version Everything**: Data, code, models, dependencies\n4. **Comprehensive Logging**: Log all important events with context\n5. **Error Handling**: Fail fast with clear error messages\n6. **Monitoring**: Track pipeline health, data quality, model drift\n7. **Testing**: Test tasks independently before integrating\n8. **Documentation**: Document DAG purpose, task dependencies\n\n## Common Patterns\n\n### Conditional Execution\n```python\nfrom airflow.operators.python import BranchPythonOperator\n\ndef choose_branch(**context):\n    accuracy = context['ti'].xcom_pull(key='accuracy', task_ids='evaluate')\n\n    if accuracy > 0.9:\n        return 'deploy_to_production'\n    else:\n        return 'retrain_with_more_data'\n\nbranch = BranchPythonOperator(\n    task_id='check_accuracy',\n    python_callable=choose_branch,\n    dag=dag\n)\n\ntrain >> evaluate >> branch >> [deploy, retrain]\n```\n\n### Parallel Training\n```python\nfrom airflow.utils.task_group import TaskGroup\n\nwith TaskGroup('train_models', dag=dag) as train_group:\n    train_rf = PythonOperator(task_id='train_rf', ...)\n    train_lr = PythonOperator(task_id='train_lr', ...)\n    train_xgb = PythonOperator(task_id='train_xgb', ...)\n\n# All models train in parallel\npreprocess >> train_group >> select_best\n```\n\n### Waiting for Data\n```python\nfrom airflow.sensors.filesystem import FileSensor\n\nwait_for_data = FileSensor(\n    task_id='wait_for_data',\n    filepath='\u002Fdata\u002Finput\u002F{{ ds }}.csv',\n    poke_interval=60,  # Check every 60 seconds\n    timeout=3600,  # Timeout after 1 hour\n    mode='reschedule',  # Don't block worker\n    dag=dag\n)\n\nwait_for_data >> process_data\n```\n",{"name":5,"license":15,"keywords":44,"description":7},"ML pipeline, Airflow, Kubeflow, MLflow, MLOps, workflow orchestration, data pipeline, model training automation, experiment tracking, model registry, Airflow DAG, task dependencies, pipeline monitoring, data quality, drift detection, hyperparameter tuning, model versioning, artifact management, Kubeflow Pipelines, pipeline automation, retries, sensors","main","5b00ad8b9f0787969474ff5e9ec417bb55f23827","skills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation",0,"https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam","https:\u002F\u002Fvril.li","https:\u002F\u002Fgithub.com\u002FVRIL-LABS","vril.li","𝗥𝗲𝘀𝗲𝗮𝗿𝗰𝗵 𝗮𝗻𝗱 𝗗𝗲𝘃𝗲𝗹𝗼𝗽𝗺𝗲𝗻𝘁 𝗖𝗼𝗻𝘀𝗼𝗿𝘁𝗶𝘂𝗺","2026-08-24 09:21:38",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add VRIL-LABS\u002Fskill-jam --skill ml-pipeline-automation",{"tool":61,"command":62},"bunx","bunx skills add VRIL-LABS\u002Fskill-jam --skill ml-pipeline-automation",{"tool":64,"command":65},"pnpm","pnpm dlx skills add VRIL-LABS\u002Fskill-jam --skill ml-pipeline-automation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation\u002FSKILL.md",true,[69,75,79],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fairflow-patterns.md","REFERENCE","参考文档",10970,"https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation\u002Freferences\u002Fairflow-patterns.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fkubeflow-mlflow.md",15477,"https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation\u002Freferences\u002Fkubeflow-mlflow.md",{"path":80,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fpipeline-monitoring.md",19213,"https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fai-ml\u002Fclaude-skills-main\u002Fclaude-skills-main\u002Fplugins\u002Fml-pipeline-automation\u002Fskills\u002Fml-pipeline-automation\u002Freferences\u002Fpipeline-monitoring.md",[84,111,125,138,163,185],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":39},"01M6R2CQRG190P09DAHMF8M5QP","three-best-practices","Three.js performance optimization and best practices guidelines. Use when writing, reviewing, or optimizing Three.js code. Triggers on tasks involving 3D scenes, WebGL\u002FWebGPU rendering, geometries, materials, textures, lighting, shaders, or TSL.","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fweb-frontend\u002Fneversight-skills_feed-three-best-practices-1.0.2\u002FSKILL.md",[],[91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],"best practices","three","three best practices","writing","performance","webgpu","guidelines","tasks","code","shaders","Optimization","3D","use","agent-skills","scenes","lighting","triggers","rendering","when","best practices guidelines",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":39},"01M6R2BPMDYK9XKWPARY0S5MS3","javascript-best-practices","Modern JavaScript best practices and performance optimization guidelines. Use when writing, reviewing, or refactoring JavaScript code to ensure optimal performance, maintainability, and modern patterns.","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fweb-frontend\u002Fneversight-skills_feed-javascript-best-practices-1.0.2\u002FSKILL.md",[],[118,91,119,94,95,97,99,101,120,121,103,122,123,124,109],"javascript","JavaScript Best Practices","refactoring","performance optimization","patterns","maintainability","name",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":39},"01M6R2B41BN09FYH76BAC5FT7X","css-best-practices","Guidelines for building modern, performant, and accessible CSS using MDN best practices. Use this when styling components, fixing layout shifts, or optimizing CSS performance.","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fweb-frontend\u002Fneversight-skills_feed-css-best-practices-1.0.3\u002FSKILL.md",[],[132,91,133,95,134,97,103,135,136,137,109],"css","css best practices","components","styling","layout","for",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":39},"01M6R2A1CEF123TZCNM1XJ2XQ4","frontend-dev","Full-stack frontend development combining premium UI design, cinematic animations,\nAI-generated media assets, persuasive copywriting, and visual art. Builds complete,\nvisually striking web pages with real media, advanced motion, and compelling copy.\nUse when: building landing pages, marketing sites, product pages, dashboards,\ngenerating media assets (image\u002Fvideo\u002Faudio\u002Fmusic), writing conversion copy,\ncreating generative art, or implementing cinematic scroll animations.","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fweb-frontend\u002Fminimax-ai-skills-frontend-dev-1.0.1\u002FSKILL.md",[],[145,146,147,148,94,149,132,150,151,152,153,154,155,156,157,158,159,160,161,162],"frontend","dev","frontend dev","design","image","react","ui","Video","Media","Audio","Tailwind","stack","music","aida","framer motion","implementing","framer","generative",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":39},"01M6R20VQ98KDX4J37TGE0FNHW","exa-rate-limits","Implement Exa rate limiting, backoff, and idempotency patterns.\nUse when handling rate limit errors, implementing retry logic,\nor optimizing API request throughput for Exa.\nTrigger with phrases like \"exa rate limit\", \"exa throttling\",\n\"exa 429\", \"exa retry\", \"exa backoff\".","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fsearch-research\u002Fjeremylongshore-claude-code-plugins-plus-skills-exa-rate-limits-1.0.0\u002FSKILL.md",[],[170,171,172,173,174,175,176,177,178,122,179,180,181,37,182,160,137,183,184,109],"exa","exa rate limits","rate","limits","throttling","api","read","write","edit","io","throughput","retry","limit","rate limit","request",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":191,"publishedAt":39},"01M6R20FV0TM7ZZTZNG7JQ1A82","exa-deploy-integration","Deploy Exa integrations to Vercel, Fly.io, and Cloud Run platforms.\nUse when deploying Exa-powered applications to production,\nconfiguring platform-specific secrets, or setting up deployment pipelines.\nTrigger with phrases like \"deploy exa\", \"exa Vercel\",\n\"exa production deploy\", \"exa Cloud Run\", \"exa Fly.io\".","https:\u002F\u002Fgithub.com\u002FVRIL-LABS\u002Fskill-jam\u002Fblob\u002Fmain\u002Fskills\u002Fsearch-research\u002Fjeremylongshore-claude-code-plugins-plus-skills-exa-deploy-integration-1.0.0\u002FSKILL.md",[],[192,193,170,194,195,196,197,198,199,200,176,177,178,201,202,203,179,204,205,109],"deploy","integration","exa deploy integration","deployment","run","secrets","fly","Bash","integrations","vercel","up","platform","trigger","cloud run"]