Skip to content

Commit 054b683

Browse files
authored
Merge pull request #171 from e06084/main
sync dev to main
2 parents 1dd8c00 + 5129cf3 commit 054b683

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3012
-376
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@
3636
</p>
3737

3838

39+
<p align="center">
40+
If you like Dingo, please give us a ⭐ on GitHub!
41+
<br/>
42+
<a href="https://github.com/DataEval/dingo/stargazers" target="_blank">
43+
<img src="docs/assets/clickstar_2.gif" alt="Click Star" width="480">
44+
</a>
45+
</p>
46+
47+
3948
# Introduction
4049

4150
Dingo is a data quality evaluation tool that helps you automatically detect data quality issues in your datasets. Dingo provides a variety of built-in rules and model evaluation methods, and also supports custom evaluation methods. Dingo supports commonly used text datasets and multimodal datasets, including pre-training datasets, fine-tuning datasets, and evaluation datasets. In addition, Dingo supports multiple usage methods, including local CLI and SDK, making it easy to integrate into various evaluation platforms, such as [OpenCompass](https://github.com/open-compass/opencompass).
@@ -183,6 +192,7 @@ Our evaluation system includes:
183192
- **Classification Metrics**: Topic categorization and content classification
184193
- **Multimodality Assessment Metrics**: Image classification and relevance evaluation
185194
- **Rule-Based Quality Metrics**: Automated quality checks using heuristic rules for effectiveness and similarity detection
195+
- **Factuality Assessment Metrics**: Two-stage factuality evaluation based on GPT-5 System Card
186196
- etc
187197

188198
Most metrics are backed by academic sources to ensure objectivity and scientific rigor.
@@ -217,6 +227,12 @@ For detailed guidance on using Dingo's hallucination detection capabilities, inc
217227

218228
📖 **[View Hallucination Detection Guide →](docs/hallucination_guide.md)**
219229

230+
### Factuality Assessment
231+
232+
For comprehensive guidance on using Dingo's two-stage factuality evaluation system:
233+
234+
📖 **[View Factuality Assessment Guide →](docs/factcheck_guide.md)**
235+
220236
# Rule Groups
221237

222238
Dingo provides pre-configured rule groups for different types of datasets:

README_ja.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
👋 <a href="https://discord.gg/Jhgb2eKWh8" target="_blank">Discord</a>と<a href="./docs/assets/wechat.jpg" target="_blank">WeChat</a>でご参加ください
3434
</p>
3535

36+
<p align="center">
37+
このプロジェクトが役に立ったら、GitHubで⭐を付けてください!
38+
<br/>
39+
<a href="https://github.com/DataEval/dingo/stargazers" target="_blank">
40+
<img src="docs/assets/clickstar_2.gif" alt="Star をクリック" width="480">
41+
</a>
42+
</p>
43+
3644

3745
# はじめに
3846

@@ -178,6 +186,7 @@ Dingoはルールベースおよびプロンプトベースの評価メトリク
178186
- **分類メトリクス**: トピック分類とコンテンツ分類
179187
- **マルチモーダル評価メトリクス**: 画像分類と関連性評価
180188
- **ルールベース品質メトリクス**: ヒューリスティックルールによる効果性と類似性検出を用いた自動品質チェック
189+
- **事実性評価メトリクス**: GPT-5 System Cardに基づく二段階事実性評価
181190
- など
182191

183192
大部分のメトリクスは学術的なソースによって支持されており、客観性と科学的厳密性を保証しています。
@@ -212,6 +221,12 @@ HHEM-2.1-Openローカル推論とLLMベース評価を含む、Dingoの幻覚
212221

213222
📖 **[幻覚検出ガイドを見る →](docs/hallucination_guide.md)**
214223

224+
### 事実性評価
225+
226+
Dingoの二段階事実性評価システムの使用に関する詳細なガイダンス:
227+
228+
📖 **[事実性評価ガイドを見る →](docs/factcheck_guide.md)**
229+
215230
# ルールグループ
216231

217232
Dingoは異なるタイプのデータセット用に事前設定されたルールグループを提供します:

README_zh-CN.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
👋 加入我们 <a href="https://discord.gg/Jhgb2eKWh8" target="_blank">Discord</a> 和 <a href="./docs/assets/wechat.jpg" target="_blank">微信</a>
3030
</p>
3131

32+
<p align="center">
33+
如果觉得有帮助,欢迎在 GitHub 上点个 ⭐ 支持!
34+
<br/>
35+
<a href="https://github.com/DataEval/dingo/stargazers" target="_blank">
36+
<img src="docs/assets/clickstar_2.gif" alt="点击 Star 支持" width="480">
37+
</a>
38+
</p>
39+
3240
</div>
3341

3442

@@ -179,6 +187,7 @@ Dingo通过基于规则和基于提示的评估指标提供全面的数据质量
179187
- **分类指标**:主题分类和内容分类
180188
- **多模态评估指标**:图像分类和相关性评估
181189
- **基于规则的质量指标**:使用启发式规则进行效果性和相似性检测的自动化质量检查
190+
- **事实性评估指标**:基于 GPT-5 System Card 的两阶段事实性评估
182191
- 等等
183192

184193
大部分指标都由学术来源支持,以确保客观性和科学严谨性。
@@ -213,6 +222,12 @@ input_data = {
213222

214223
📖 **[查看幻觉检测指南 →](docs/hallucination_guide.md)**
215224

225+
### 事实性评估
226+
227+
有关使用Dingo两阶段事实性评估系统的详细指导:
228+
229+
📖 **[查看事实性评估指南 →](docs/factcheck_guide.md)**
230+
216231
# 规则组
217232

218233
Dingo为不同类型的数据集提供预配置的规则组:

app_gradio/app.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,26 @@ def dingo_demo(
4848

4949
try:
5050
input_data = {
51-
"dataset": dataset_source,
52-
"data_format": data_format,
5351
"input_path": final_input_path,
5452
"output_path": "" if dataset_source == 'hugging_face' else os.path.dirname(final_input_path),
55-
"save_data": True,
56-
"save_raw": True,
57-
58-
"max_workers": max_workers,
59-
"batch_size": batch_size,
60-
61-
"column_content": column_content,
62-
"custom_config": {
53+
"dataset": {
54+
"source": dataset_source,
55+
"format": data_format,
56+
"field": {
57+
"content": column_content
58+
}
59+
},
60+
"executor": {
6361
"rule_list": rule_list,
6462
"prompt_list": prompt_list,
63+
"result_save": {
64+
"bad": True,
65+
"raw": True
66+
},
67+
"max_workers": max_workers,
68+
"batch_size": batch_size,
69+
},
70+
"evaluator": {
6571
"llm_config": {
6672
scene_list: {
6773
"model": model,
@@ -72,11 +78,11 @@ def dingo_demo(
7278
}
7379
}
7480
if column_id:
75-
input_data['column_id'] = column_id
81+
input_data['dataset']['field']['id'] = column_id
7682
if column_prompt:
77-
input_data['column_prompt'] = column_prompt
83+
input_data['dataset']['field']['prompt'] = column_prompt
7884
if column_image:
79-
input_data['column_image'] = column_image
85+
input_data['dataset']['field']['image'] = column_image
8086

8187
# print(input_data)
8288
# exit(0)

app_gradio/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
color: #fafafa;
6868
opacity: 0.8;
6969
">
70-
Dingo: A Comprehensive Data Quality Evaluation Tool.<br>
70+
Dingo: A Comprehensive AI Data Quality Evaluation Tool.<br>
7171
</p>
7272
<style>
7373
.link-block {

dingo/exec/local.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ def evaluate(self):
173173
log.debug("[Summary]: " + str(self.summary))
174174

175175
def evaluate_single_data(self, group_type, group, data: Data):
176+
# Ensure dynamic configs are applied in child processes as well
177+
try:
178+
Model.apply_config(self.input_args)
179+
except Exception as e:
180+
raise RuntimeError(f"Failed to apply config in child process: {e}")
176181
result_info = ResultInfo(
177182
data_id=data.data_id, prompt=data.prompt, content=data.content
178183
)

0 commit comments

Comments
 (0)