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

Raise exception instead of assert in BertScore #292

Merged
merged 2 commits into from
Sep 21, 2022
Merged

Raise exception instead of assert in BertScore #292

merged 2 commits into from
Sep 21, 2022

Conversation

BramVanroy
Copy link
Contributor

Asserts get ignored when using -O optimized flag in Python. Avoid using them for variable checking!

This PR transformers the assert into a raise exception.

Bram Vanroy added 2 commits September 16, 2022 11:50
asserts get ignored when using -O optimized flag. Avoid using them for variable checking!
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 16, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@lvwerra lvwerra left a comment

Choose a reason for hiding this comment

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

That makes sense, thanks @BramVanroy! 🚀

@lvwerra lvwerra merged commit 99ec25a into huggingface:main Sep 21, 2022
@BramVanroy BramVanroy deleted the avoid-assert-bertscore branch September 21, 2022 07:52
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.

None yet

3 participants