Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] fix mia-bench evaluation #456

Merged
merged 1 commit into from
Dec 12, 2024
Merged

[Fix] fix mia-bench evaluation #456

merged 1 commit into from
Dec 12, 2024

Conversation

Luodian
Copy link
Contributor

@Luodian Luodian commented Dec 11, 2024

🐛 fix(utils): handle empty score calculation gracefully

  • ensure total_score calculation only if loop executed
  • set total_score to 0 if first_sentence has less than two elements

Before you open a pull-request, please check if a similar issue already exists or has been closed before.

When you open a pull-request, please be sure to include the following

  • A descriptive title: [xxx] XXXX
  • A detailed description

If you meet the lint warnings, you can use following scripts to reformat code.

pip install pre-commit
pre-commit install
pre-commit run --all-files

Thank you for your contributions!

- ensure total_score calculation only if loop executed
- set total_score to 0 if first_sentence has less than two elements
@Luodian
Copy link
Contributor Author

Luodian commented Dec 11, 2024

image

@pufanyi pufanyi self-requested a review December 12, 2024 12:29
@pufanyi pufanyi merged commit e7c3a0d into main Dec 12, 2024
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.

2 participants