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

only track unique missing dependencies #246

Merged
merged 1 commit into from
Aug 15, 2022
Merged

only track unique missing dependencies #246

merged 1 commit into from
Aug 15, 2022

Conversation

BramVanroy
Copy link
Contributor

Currently, when you load a metric that loads the same metric twice, e.g., chrF, the error message for the missing library will mention that library multiple times. For instance:

ImportError: To be able to use evaluate-metric/chrf, you need to install the following dependencies['sacrebleu', 'sacrebleu'] using 'pip install sacrebleu sacrebleu' for instance'

This PR simply changes the tracked import errors with a set rather than a list so that unique missing libraries are collected.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 11, 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 looks good, thanks for fixing it @BramVanroy!

@lvwerra lvwerra merged commit 44f457a into huggingface:main Aug 15, 2022
@BramVanroy BramVanroy deleted the patch-1 branch August 15, 2022 14:28
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