スキル一覧に戻る
colingwuyu

mlops-patterns

by colingwuyu

0🍴 0📅 2026年1月7日
GitHubで見るManusで実行

SKILL.md


name: mlops-patterns description: Follow these patterns when implementing MLOps features in OptAIC. Use for ML model definitions (5-component structure), model instances, training/inference pipelines, model registry, and monitoring. Covers signal models, macro regime models, relevance models, and signal combining/filtering models.

MLOps Implementation Patterns

Guide for implementing MLOps features that integrate with OptAIC's resource-based architecture.

When to Use

Apply when:

  • Creating ML Model Definitions (MLModuleDef) with 5 code components
  • Implementing Model Instances in MLOps Center
  • Building training, inference, or monitoring pipelines
  • Integrating with model registry (MLflow or internal)
  • Implementing model categories (signal, regime, relevance, combining)

MLOps Three-Tier Model

MLModuleDef (Definition)    ModelInstance (Config)       Execution (Runs)
────────────────────────    ──────────────────────       ─────────────────
XGBSignalModelDef       →   SPX_Alpha_Model          →   TrainingRun
  (5 code components)         (datasets + config)          InferenceRun
                                                           MonitoringRun
                                                               ↓
                                                         ModelVersion

ML Model Categories

CategoryPurposeTypical Outputs
Signal ModelGenerate alpha signalsSignal dataset [-1, 1]
Macro Regime ModelClassify market regimesRegime labels/probabilities
Relevance ModelScore feature importanceRelevance scores
Signal Combining ModelCombine multiple signalsCombined signal
Signal Filtering ModelFilter/rank signalsFiltered signal set

Implementation Workflow

1. Create MLModuleDef (5 Components)

MLModelDef/
├── model/           # Model architecture + hyperparameter schema
├── training/        # Trainer + evaluator
├── inference/       # Predictor + batch inference
├── monitoring/      # Data drift + performance monitoring
├── tests/           # Test suite for all components
└── docs/            # Documentation

See references/mlmodule-structure.md.

2. Create Model Instance

Compose MLModuleDef + datasets + config. See references/model-instance.md.

3. Implement Pipelines

  • TrainingPipeline → reads datasets, produces ModelVersion
  • InferencePipeline → reads features + model, writes predictions
  • MonitoringPipeline → reads data/preds, emits metrics/alerts

See references/mlops-pipelines.md.

4. Integrate with Registry

See references/model-registry.md.

5. Create UI Components (MLOps Center)

Two views required:

  • Model Instance View - registered models with configs
  • Execution View - training, registry, inference, monitoring

See references/mlops-center-ui.md.

Critical Rules

  1. 5-component structure - MLModuleDef must have model, training, inference, monitoring, tests
  2. Activity emission - All runs emit activities (training, inference, monitoring)
  3. Lineage tracking - Link dataset versions → model version → prediction dataset
  4. Guardrails - Validate model outputs (e.g., signal bounds)
  5. PIT correctness - No lookahead in training or inference

Tech Stack

ToolPurposeMode
MLflowExperiment tracking, model registryOptional (--with-mlflow)
EvidentlyData drift, performance monitoring, test suitesAlways available
WhyLogsLightweight data profilingOptional
PrefectWorkflow orchestrationOptional (--with-prefect)

Unified ML SDK (optaic.mlops)

All MLOps infrastructure is wrapped in a unified SDK for seamless development:

from optaic.mlops import tracking, registry, monitoring, pipeline
from optaic.mlops.base import BaseModel, BaseTrainer
from optaic.mlops.data import load_dataset

Key modules:

  • tracking - Experiment logging (wraps MLflow)
  • registry - Model versioning (wraps MLflow Model Registry)
  • monitoring - Drift & performance (wraps Evidently)
  • pipeline - Orchestration (wraps Prefect)
  • data - PIT-aware dataset access
  • base - Base classes for model definitions

See references/unified-sdk.md and Blueprint section 8.9.

Reference Files

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です