Skip to content

feat: score实时更新#447

Merged
shijinpjlab merged 2 commits into
MigoXLab:devfrom
shijinpjlab:dev_0710
Jul 10, 2026
Merged

feat: score实时更新#447
shijinpjlab merged 2 commits into
MigoXLab:devfrom
shijinpjlab:dev_0710

Conversation

@shijinpjlab

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the execution logic in dingo/exec/local.py to dynamically calculate and update the summary score during execution, ensuring it remains accurate if a task terminates early. The review feedback correctly points out that the conditional check self.summary.total > 0 is redundant because the total has just been incremented, and suggests simplifying the code by removing the unnecessary if-else block.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread dingo/exec/local.py Outdated
Comment on lines +142 to +149
# Keep score updated during execution so get_summary()
# remains meaningful even if the task stops early.
if self.summary.total > 0:
self.summary.score = round(
self.summary.num_good / self.summary.total * 100, 2
)
else:
self.summary.score = 0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

由于在前面已经执行了 self.summary.total += 1self.summary.total 的值必然大于 0。因此,这里的 if self.summary.total > 0 判断和 else 分支是多余的,可以直接进行计算以简化代码并提高可读性。

                    # Keep score updated during execution so get_summary()
                    # remains meaningful even if the task stops early.
                    self.summary.score = round(
                        self.summary.num_good / self.summary.total * 100, 2
                    )

@shijinpjlab
shijinpjlab merged commit 8c263a5 into MigoXLab:dev Jul 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant