ml-data-pipeline
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to ingest, clean, validate, transform, version, monitor, or serve ML data and features. PROACTIVELY activate for…
от JosiahSiegel★ 67 звёзд на GitHubОб этом скилле
ML Data Pipeline
Overview
Use this skill for data ingestion, validation, preprocessing, feature engineering, dataset versioning, feature stores, batch and streaming pipelines, and data-quality monitoring. In ML, data pipeline correctness is often more important than model sophistication. A pipeline must produce leakage-safe training data and consistent serving features.
Data Data Pipeline Invariants
- Raw data is immutable or snapshot-addressable.
- Schemas, statistics, and quality expectations are validated before training and serving.
- Transformations are versioned and reproducible.
- Splits are created before leakage-prone operations such as oversampling, target encoding, feature selection, or normalization.
- Time-dependent features use only information available at prediction time.
- Offline training features match online serving features.
- Sensitive data is minimized, access-controlled, encrypted, and audited.
Ingestion and Storage
Choose storage based on data shape and access pattern. Object storage with Parquet/Arrow is a strong default for tabular batch ML. Delta Lake, Apache Iceberg, or Hudi add ACID tables, schema evolution, and time travel. Use warehouses for governed SQL features, vector stores for embedding retrieval, and streaming logs for online behavior. Store raw, cleaned, feature, and model-ready layers separately. For Azure Storage pointer blobs used by ADF to pass Azure ML code asset versions, load ml-azureml-adf-automation.
For large datasets, prefer columnar formats, partitioning by time or high-level domain, compression, predicate pushdown, and manifest files. Avoid many tiny files; compact when necessary. Record dataset snapshot identifiers in every training run.
Feast Feature Store Blueprint
Feast is a modular feature store for maintaining online-offline feature consistency.
1. Feature Store Configuration (feature_store.yaml)
project: fraud_detection
registry: data/registry.db
provider: local
online_store:
type: redis
connection_string: "localhost:6379"
offline_store:
type: file
2. Feature Definitions (features.py)
from datetime import timedelta
from feast import Entity, FeatureView, Field, FileSource, ValueType
from feast.types import Float32, Int64
user = Entity(name="user_id", value_type=ValueType.INT64, join_keys=["user_id"])
user_transactions_source = FileSource(
path="data/user_transactions.parquet",
event_timestamp_column="timestamp",
created_timestamp_column="created_timestamp",
)
user_transactions_fv = FeatureView(
name="user_transactions_feature_view",
entities=[user],
ttl=timedelta(days=90),
schema=[
Field(name="transaction_count_30d", dtype=Int64),
Field(name="total_amount_30d", dtype=Float32),
],
online=True,
source=user_transactions_source,
)
Processing Engines
| Engine | Best fit |
|---|---|
| pandas | Small to medium in-memory exploration and simple pipelines |
| Polars | Fast local/lazy columnar processing, larger-than-pandas workloads |
| Spark | Large distributed ETL, lakehouse workflows, SQL + MLlib integration |
| Dask | Python-native distributed arrays/dataframes and custom workloads |
| Ray Data | ML-centric distributed preprocessing integrated with Ray Train/Tune/Serve |
| Beam/Flink/Spark Streaming | Streaming or unified batch/stream dataflows |
| Airflow/Prefect/Dagster | Orchestration, scheduling, retries, lineage, and dependency management |
High-Performance Polars Lazy Aggregation Pipeline
Polars lazy evaluation optimizes the execution plan using predicate and projection pushdowns.
import polars as pl
def compute_rolling_user_features(transactions_path: str):
lazy_df = (
pl.scan_parquet(transactions_path)
# Cast timestamp for windowing
.with_columns(pl.col("timestamp").str.strptime(pl.Datetime))
.sort("timestamp")
# Define rolling calculation window
.group_by_dynamic(
index_column="timestamp",
every="1d",
period="30d",
group_by="user_id"
)
.agg([
pl.col("amount").count().alias("transaction_count_30d"),
pl.col("amount").sum().alias("total_amount_30d"),
pl.col("amount").mean().alias("avg_amount_30d")
])
.filter(pl.col("user_id").is_not_null())
)
# Collect executes the query optimization and loads results into memory
return lazy_df.collect()
Spark Dataframe Optimization Recipes
Prevent typical distributed training bottlenecks such as data skew and excessive shuffle overhead.
1. Salting to Prevent Skewed Joins
from pyspark.sql import functions as F
# Adding a salt column to distribute skewed key values evenly across partitions
skewed_df = skewed_df.with_columns(
(F.rand() * 10).cast("int").alias("salt")
)
lookup_df = lookup_df.with_columns(
F.explode(F.array([F.lit(i) for i in range(10)])).alias("
Установить ml-data-pipeline в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл ml-data-pipeline?
This skill should be used when the user asks to ingest, clean, validate, transform, version, monitor, or serve ML data and features. PROACTIVELY activate for: (1) data ingestion, preprocessing, feature engineering, leakage prevention, train/serving skew, (2) Spark, Dask, Polars, pandas, Ray Data, streaming pipelines, (3) Great Expectations, TFDV, Deequ, data quality and validation, (4) DVC, lakehouse tables, dataset versioning, lineage, reproducibility, (5) Feast, Tecton, Hopsworks feature stores, point-in-time joins, online/offline features. Provides: scalable, reproducible, leakage-safe ML data pipeline design.
Как установить скилл ml-data-pipeline?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ml-data-pipeline запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic