用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-mlops --skill feature-stores命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | feature-stores |
| version | 2.0.0 |
| sasmp_version | 1.3.0 |
| description | Master feature stores - Feast, data validation, versioning, online/offline serving |
| bonded_agent | 03-data-pipelines |
| bond_type | PRIMARY_BOND |
| category | data_engineering |
| difficulty | intermediate_to_advanced |
| estimated_hours | 35 |
| prerequisites | ["mlops-basics"] |
| validation | {"pre_conditions":["Completed mlops-basics skill","Understanding of data pipelines"],"post_conditions":["Can design feature store architecture","Can implement features with Feast","Can validate data quality"]} |
| observability | {"metrics":["features_created","validation_checks_passed","latency_measurements"]} |
Learn: Build production feature stores for ML systems.
| Attribute | Value |
|---|---|
| Bonded Agent | 03-data-pipelines |
| Difficulty | Intermediate to Advanced |
| Duration | 35 hours |
| Prerequisites | mlops-basics |
Components:
┌─────────────────────────────────────────────────────────────┐
│ FEATURE STORE ARCHITECTURE │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Offline │ │ Feature │ │ Online │ │
│ │ Store │───▶│ Registry │◀───│ Store │ │
│ │ (Parquet) │ │ (Metadata) │ │ (Redis) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ [Training] [Discovery] [Inference] │
│ │
└─────────────────────────────────────────────────────────────┘
Exercises:
Feature Definition Example:
from feast import Entity, Feature, FeatureView, FileSource
from feast.types Float32, Int64
datetime timedelta
customer = Entity(
name=,
value_type=ValueType.INT64,
description=
)
customer_features = FeatureView(
name=,
entities=[],
ttl=timedelta(days=),
schema=[
Feature(name=, dtype=Float32),
Feature(name=, dtype=Float32),
Feature(name=, dtype=Int64),
],
online=,
source=customer_stats_source
)
Exercises:
Great Expectations Setup:
import great_expectations as gx
# Create validation suite
suite = context.add_expectation_suite("ml_data_validation")
# Add expectations
suite.add_expectation(
gx.expectations.ExpectColumnValuesToNotBeNull(
column="target",
mostly=0.99
)
)
suite.add_expectation(
gx.expectations.ExpectColumnMeanToBeBetween(
column="feature_a",
min_value=0.0,
max_value=100.0
)
)
DVC Workflow:
# Initialize DVC
dvc init
# Add data to tracking
dvc add data/training_data.parquet
# Push to remote storage
dvc push
# Checkout specific version
git checkout v1.0.0
dvc checkout
# templates/feature_pipeline.py
from sklearn.base import BaseEstimator, TransformerMixin
import pandas as pd
class FeaturePipeline(BaseEstimator, TransformerMixin):
"""Production feature engineering pipeline."""
def __init__(self, config: dict):
self.config = config
self.feature_names = []
def fit(self, X: pd.DataFrame, y=None):
"""Learn feature statistics."""
self.means = X.select_dtypes(include=['number']).mean()
self.stds = X.select_dtypes(include=['number']).std()
return self
def transform(self, X: pd.DataFrame) -> pd.DataFrame:
"""Apply feature transformations."""
X = X.copy()
# Numerical normalization
for col in X.select_dtypes(include=['number']).columns:
X[f"{col}_normalized"] = (X[col] - self.means[col]) / self.stds[col]
# Temporal features
for col in self.config.get("datetime_columns", []):
X[f"{col}_hour"] = pd.to_datetime(X[col]).dt.hour
X[f"{col}_dow"] = pd.to_datetime(X[col]).dt.dayofweek
return X
| Issue | Cause | Solution |
|---|---|---|
| Slow feature serving | Online store bottleneck | Scale Redis, add caching |
| Training-serving skew | Different transformations | Use unified feature pipeline |
| Stale features | Materialization lag | Increase refresh frequency |
| Version | Date | Changes |
|---|---|---|
| 2.0.0 | 2024-12 | Production-grade with Feast examples |
| 1.0.0 | 2024-11 | Initial release |