mlflow-onboarding
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "mlflow-onboarding":https://skillpi.com/zh/skills/deepskill-652644428081b4118a493877db834c28b6f91db7dfe0ffe13a0a1a901ec6b3f0。安装前核对上游来源和版本:https://github.com/Kilo-Org/kilo-marketplace。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
根据用户的用例(生成式AI代理/应用或传统机器学习/深度学习)引导用户快速上手 MLflow,并推荐相关的快速入门教程和初始集成方案。若提供实验 ID,应将其作为输入以帮助确定用例。触发场景包括用户询问如何开始使用 MLflow、设置跟踪、添加可观测性或将其集成到项目中。
介绍来源: third_party · Kilo-Org · 0.0.1 参考来源
SkillPi 解读
- 实测状态
- 未测试
文件浏览
Frontmatter
name: mlflow-onboarding
description: >-
Onboards users to MLflow by determining their use case (GenAI agents/apps or
traditional ML/deep learning) and guiding them through relevant quickstart
tutorials and initial integration. If an experiment ID is available, it should
be supplied as input to help determine the use case. Use when the user asks to
get started with MLflow, set up tracking, add observability, or integrate
MLflow into their project. Triggers on "get started with MLflow", "set up
MLflow", "onboard to MLflow", "add MLflow to my project", "how do I use
MLflow".
metadata:
category: data
source:
repository: 'https://github.com/mlflow/skills'
path: mlflow-onboarding
license_path: LICENSE
commit: 5f561418262bdcaa9e705bdf7facc72f17b181fcMLflow Onboarding
MLflow supports two broad use cases that require different onboarding paths:
- GenAI applications and agents: LLM-powered apps, chatbots, RAG pipelines, tool-calling agents. Key MLflow features include tracing for observability, evaluation with LLM judges, and prompt management, among others.
- Traditional ML / deep learning models: scikit-learn, PyTorch, TensorFlow, XGBoost, etc. Key MLflow features include experiment tracking (parameters, metrics, artifacts), model logging, and model deployment, among others.
Determining which use case applies is the first and most important step. The onboarding path, quickstart tutorials, and integration steps differ significantly between the two.
Step 1: Determine the Use Case
Before recommending tutorials or integration steps, determine which use case the user is working on. Use the signals below, checking them in order. If the signals are ambiguous or absent, you MUST ask the user directly.
Signal 1: Check the Codebase
Search the user's project for imports and usage patterns that indicate the use case:
GenAI indicators (any of these suggest GenAI):
- Imports from LLM client libraries:
openai,anthropic,google.generativeai,google.genai,langchain,langchain_openai,langgraph,llamaindex,litellm,autogen,crewai,dspy - Imports from MLflow GenAI modules:
mlflow.genai,mlflow.tracing,mlflow.openai,mlflow.langchain - Usage of chat completions, embeddings, or agent frameworks
- Prompt templates or prompt engineering code
Traditional ML indicators (any of these suggest ML):
- Imports from ML frameworks:
sklearn,torch,tensorflow,keras,xgboost,lightgbm,catboost,statsmodels,scipy - Imports from MLflow ML modules:
mlflow.sklearn,mlflow.pytorch,mlflow.tensorflow - Model training loops,
.fit()calls, hyperparameter tuning code - Dataset loading with tabular/image/time-series data
# Search for GenAI indicators
grep -rl --include='*.py' -E '(import openai|import anthropic|from langchain|from langgraph|import litellm|from mlflow\.genai|from mlflow\.tracing|mlflow\.openai|mlflow\.langchain|ChatCompletion|chat\.completions)' .
# Search for ML indicators
grep -rl --include='*.py' -E '(from sklearn|import torch|import tensorflow|import keras|import xgboost|import lightgbm|mlflow\.sklearn|mlflow\.pytorch|mlflow\.tensorflow|\.fit\()' .
Signal 2: Check the Experiment Type Tag
If the codebase or project directory is the MLflow repository itself, skip to Signal 3 — the MLflow repo contains code for all use cases and does not indicate the user's intent.
If the experiment ID is known, check its mlflow.experimentKind tag. This tag is set by MLflow to indicate the experiment type:
mlflow experiments get --experiment-id <EXPERIMENT_ID> --output json > /tmp/exp_detail.json
jq -r '.tags["mlflow.experimentKind"] // "not set"' /tmp/exp_detail.json
genai_development→ GenAI use casecustom_model_development→ Traditional ML use case- Not set → Proceed to Signal 3
If the experiment ID is not known, skip to Signal 3.
Signal 3: Ask the User
If the codebase and experiment signals are inconclusive, ask directly:
Are you building a GenAI application (e.g., an LLM-powered chatbot, RAG pipeline, or tool-calling agent) or a traditional ML/deep learning model (e.g., training a classifier, regression model, or neural network)?
Do not guess. The onboarding paths are different enough that starting down the wrong one wastes the user's time.
Step 2: Recommend Quickstart Tutorials
Once the use case is determined, recommend the appropriate quickstart tutorials from the MLflow documentation. Present them to the user and ask if they'd like to follow along or jump directly to integrating MLflow into their project.
GenAI Path
The MLflow GenAI documentation is at: https://mlflow.org/docs/latest/genai/getting-started/
Choose the most relevant tutorials based on the user's context and what they've told you. Available tutorials include:
- Tracing Quickstart (https://mlflow.org/docs/latest/genai/tracing/quickstart/) — Enabling automatic tracing for LLM calls. Covers starting an MLflow server, creating an experiment, enabling autologging, and viewing traces in the UI.
- Python + OpenAI variant: https://mlflow.org/docs/latest/genai/tracing/quickstart/python-openai/
- TypeScript + OpenAI variant: https://mlflow.org/docs/latest/genai/tracing/quickstart/typescript-openai
- OpenTelemetry (language-agnostic) variant: also linked from the quickstart page
- Evaluation Quickstart (https://mlflow.org/docs/latest/genai/eval-monitor/quickstart/) — Evaluating GenAI application quality using LLM judges (scorers). Covers defining datasets, prediction functions, and built-in + custom scorers.
- Version Tracking Quickstart (https://mlflow.org/docs/latest/genai/version-tracking/quickstart/) — Prompt management, application versioning, and connecting tracing to versioned prompts.
If none of these match the user's needs, look up the MLflow GenAI documentation for more relevant guides.
Traditional ML Path
The MLflow ML documentation is at: https://mlflow.org/docs/latest/ml/getting-started/
Choose the most relevant tutorials based on the user's context and what they've told you. Available tutorials include:
- Tracking Quickstart (https://mlflow.org/docs/latest/ml/tracking/quickstart/) — Experiment tracking with scikit-learn: autologging, manual parameter/metric/model logging, and exploring results in the MLflow UI.
- Deep Learning Tutorial (https://mlflow.org/docs/latest/ml/getting-started/deep-learning/) — Training a PyTorch model with MLflow logging: parameters, metrics, checkpoints, and system metrics (GPU utilization, memory).
- Hyperparameter Tuning Tutorial (https://mlflow.org/docs/latest/ml/getting-started/hyperparameter-tuning/) — Running hyperparameter searches with Optuna + MLflow, comparing results, and selecting the best model.
If none of these match the user's needs, look up the MLflow ML documentation for more relevant guides.
Step 3: Integrate MLflow into the User's Project
After the user has reviewed the quickstart tutorials (or opted to skip them), offer to help integrate MLflow directly into their codebase. Always ask for the user's consent before making changes to their code.
GenAI Integration
The core integration for GenAI apps is tracing — capturing LLM calls, tool invocations, and agent steps automatically.
If asked to create an example project: Do not assume the user has LLM API keys (e.g., OpenAI, Anthropic). Instead, create traces with mock data using @mlflow.trace and mlflow.start_span() to demonstrate tracing without requiring external API access. For example:
import mlflow
mlflow.set_experiment("example-genai-app")
@mlflow.trace
def mock_chat(query: str) -> str:
with mlflow.start_span(name="retrieve_context") as span:
context = "Mock retrieved context for: " + query
span.set_inputs({"query": query})
span.set_outputs({"context": context})
with mlflow.start_span(name="generate_response") as span:
response = "Mock response based on: " + context
span.set_inputs({"context": context, "query": query})
span.set_outputs({"response": response})
return response
mock_chat("What is MLflow?")
What to set up (for an existing project):
-
Autologging — If the user's code uses a supported framework, a single line automatically traces all calls to their LLM provider. See https://mlflow.org/docs/latest/genai/tracing/ for the full list of supported providers. If the provider is supported:
import mlflow # Pick the one that matches the user's LLM provider: mlflow.openai.autolog() # OpenAI SDK mlflow.anthropic.autolog() # Anthropic SDK mlflow.gemini.autolog() # Google Gemini (google-genai SDK) mlflow.langchain.autolog() # LangChain / LangGraph mlflow.litellm.autolog() # LiteLLMAdd this call once at application startup (e.g., top of
main.py,app.py, or the entry point module). It must execute before any LLM calls are made.If the provider is not supported by autologging, skip to step 3 (Custom tracing) and use
@mlflow.traceto manually instrument the relevant functions. -
Experiment configuration — Set the experiment so traces are organized:
mlflow.set_experiment("my-genai-app")Or via environment variable:
export MLFLOW_EXPERIMENT_NAME="my-genai-app" -
Custom tracing (optional) — For functions that aren't automatically traced (custom tools, business logic), use the
@mlflow.tracedecorator:@mlflow.trace def my_custom_tool(query: str) -> str: # ... tool logic ... return result
Where to add it: Find the application's entry point or initialization module and add the autologging call there. Search for the main LLM client instantiation (e.g., openai.OpenAI(), ChatOpenAI()) to find the right location.
Traditional ML Integration
The core integration for ML is experiment tracking — capturing parameters, metrics, and models from training runs.
What to set up:
-
Autologging — If the user's code uses a supported framework, a single line automatically logs parameters, metrics, and models during training. See https://mlflow.org/docs/latest/ml/ for the full list of supported frameworks. If the framework is supported:
import mlflow # Pick the one that matches the user's ML framework: mlflow.sklearn.autolog() # scikit-learn mlflow.pytorch.autolog() # PyTorch / PyTorch Lightning mlflow.tensorflow.autolog() # TensorFlow / Keras mlflow.xgboost.autolog() # XGBoost mlflow.lightgbm.autolog() # LightGBMAdd this call once before training starts. It automatically captures
model.fit()calls, logged metrics, and model artifacts.If the framework is not supported by autologging, skip to step 3 (Manual logging) and use
mlflow.log_param(),mlflow.log_metric(), andmlflow.log_artifact()to log data explicitly. -
Experiment configuration — Set the experiment so runs are organized:
mlflow.set_experiment("my-ml-experiment")Or via environment variable:
export MLFLOW_EXPERIMENT_NAME="my-ml-experiment" -
Manual logging (optional) — For metrics or parameters not captured by autologging:
with mlflow.start_run(): mlflow.log_param("custom_param", value) mlflow.log_metric("custom_metric", value)
Where to add it: Find the training script or module where model.fit() (or equivalent) is called. Add the autologging call before the training loop begins.
Verification
After integration, verify that MLflow is capturing data correctly:
GenAI Verification
- Run the application and trigger at least one LLM call
- Check for traces:
mlflow traces search \ --experiment-id <EXPERIMENT_ID> \ --max-results 5 \ --extract-fields 'info.trace_id,info.state,info.request_time' \ --output json > /tmp/verify_traces.json jq '.traces | length' /tmp/verify_traces.json - If traces appear, open the MLflow UI to inspect them visually
ML Verification
- Run the training script
- Check for runs:
mlflow runs search \ --experiment-id <EXPERIMENT_ID> \ --max-results 5 \ --output json > /tmp/verify_runs.json jq '.runs | length' /tmp/verify_runs.json - If runs appear, open the MLflow UI to inspect logged parameters, metrics, and artifacts
版本历史
-
skills-20261103210927-6c1b454
GitHub ↗
原版更新说明
Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323
-
skills-20260928190452-ff51758
GitHub ↗
原版更新说明
Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505
-
skills-20260924105536-d31110d
GitHub ↗
原版更新说明
Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049
-
skills-20260923085113-cea285e
GitHub ↗
原版更新说明
Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7
-
skills-20260922193956-97d7333
GitHub ↗
原版更新说明
Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866
此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 精准区分 GenAI 和传统 ML 两种使用场景,提供针对性引导
- 提供完整的端到端集成方案和验证步骤,实用价值高
亮点
- 触发词覆盖全面,包含多种常见表达方式
- 边界清晰,专门针对 MLflow 新手引导场景
待提升项
-
文档长度 原报告严重程度:轻微
文档内容较详细,约180行,可能影响阅读体验
改进建议:建议适当精简内容,或拆分为多个子章节
亮点
- 结构清晰,分步骤引导用户完成整个 onboarding 流程
- 包含丰富的代码示例和具体操作命令
亮点
- 提供 fallback 方案(如 autolog 不支持时手动 tracing)
- 要求用户确认后才修改代码,避免误操作
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- github.com
- mlflow.org
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。