modelscope·@DataEval/dingo
丁戈 MCP 服务器
Dingo 是一个数据质量评估工具,可以帮助您自动检测数据集中的数据质量问题。Dingo 提供了多种内置规则和模型评估方法,并且支持自定义评估方法。Dingo 支持常用的文本数据集和多模态数据集,包括预训练数据集、微调数据集和评估数据集。此外,Dingo 支持多种使用方式,包括本地 CLI 和 SDK,使其易于集成到各种评估平台中,例如 OpenCompass。

shell pip install dingo-python
python from dingo.config.config import DynamicLLMConfig from dingo.io.input.MetaData import MetaData from dingo.model.llm.llm_text_quality_model_base import LLMTextQualityModelBase from dingo.model.rule.rule_common import RuleEnterAndSpace
def llm(): data = MetaData( data_id=123, prompt="hello, introduce the world", content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty." )
LLMTextQualityModelBase.dynamic_config = DynamicLLMConfig(
key= ,
api_url= ,
# model= ,
)
res = LLMTextQualityModelBase.eval(data)
print(res)
def rule(): data = MetaData( data_id=123, prompt="hello, introduce the world", content="Hello! The world is a vast and diverse place, full of wonders, cultures, and incredible natural beauty." )
res = RuleEnterAndSpace().eval(data)
print(res)
python from dingo.io import InputArgs from dingo.exec import Executor
input_data = { "eval_group": "sft", # SFT 数据的规则集 "input_path": "data.txt", # 本地文本文件路径 "dataset": "local", "data_format": "plaintext", # 格式:纯文本 "save_data": True # 保存评估结果 }
input_args = InputArgs(**input_data) executor = Executor.exec_map"local" result = executor.execute() print(result)### 3. 评估 Hugging Face 数据集
python from dingo.io import InputArgs from dingo.exec import Executor
input_data = { "eval_group": "sft", # 用于 SFT 数据的规则集 "input_path": "tatsu-lab/alpaca", # 来自 Hugging Face 的数据集 "data_format": "plaintext", # 格式:纯文本 "save_data": True # 保存评估结果 }
input_args = InputArgs(**input_data) executor = Executor.exec_map"local" result = executor.execute() print(result)
python from dingo.io import InputArgs from dingo.exec import Executor
input_data = { "eval_group": "default", # 默认规则集 "input_path": "data.json", # 本地 JSON 文件路径 "dataset": "local", "data_format": "json", # 格式:json "column_content": "text", # 包含要评估文本的列 "save_data": True # 保存评估结果 }
input_args = InputArgs(**input_data) executor = Executor.exec_map"local" result = executor.execute() print(result)
python from dingo.io import InputArgs from dingo.exec import Executor
input_data = { "input_path": "data.jsonl", # 本地 JSONL 文件路径 "dataset": "local", "data_format": "jsonl", "column_content": "content", "custom_config": { "prompt_list": ["PromptRepeat"], # 使用的提示 "llm_config": { "detect_text_quality": { "model": "gpt-4o", "key": "YOUR_API_KEY", "api_url": "https://api.openai.com/v1/chat/completions" } } } }
input_args = InputArgs(**input_data) executor = Executor.exec_map"local" result = executor.execute() print(result)
shell python -m dingo.run.cli --input_path data.txt --dataset local -e sft --data_format plaintext --save_data True
shell python -m dingo.run.cli --input_path data.json --dataset local -e openai --data_format json --column_content text --custom_config config_gpt.json --save_data True
示例 config_gpt.json:
json
{
"llm_config": {
"openai": {
"model": "gpt-4o",
"key": "YOUR_API_KEY",
"api_url": "https://api.openai.com/v1/chat/completions"
}
}
}
在评估后(使用 save_data=True),将自动生成一个前端页面。手动启动前端:
shell python -m dingo.run.vsl --input output_directory
其中 output_directory 包含带有 summary.json 文件的评估结果。
![GUI …
审计 npm 包依赖项以查找安全漏洞,提供详细的报告和修复建议,并集成 MCP。
通过API层将克劳德桌面版直接连接到数据库,使其能够探索数据库结构、编写SQL查询、分析数据集和创建报告。该API层还包含用于表探索和查询执行的工具。
DBCode 是一个 Visual Studio Code 扩展,允许你管理许多数据库,包括 PostgreSQL、MySQL、SQL Server、DuckDB、Redis、MongoDB 等更多数据库。 DBCode 提供了运行 MCP 服务器的选项,可以访问这些数据库、它们的模式以及执行查询的能力。
AI 首选的统一数据访问通道,支持30多种数据源(阿里云全系/主流数据库/数仓)的安全访问。
后端服务,实现了模型控制面板协议,可连接到 Apache Doris 数据库,允许用户执行 SQL 查询、管理元数据,并且有可能利用大语言模型(LLMs)完成自然语言到 SQL 的转换等任务。
提供对Excel文件的操纵功能。此服务器启用工作簿创建、数据操纵、格式设置和高级Excel功能。