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 inconstent warnings.warn in repocard.py #1980

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jan 15, 2024

Fix #1978 cc @osanseviero

Let's stick to the rule from the Python official documentation:

warnings.warn() in library code if the issue is avoidable and the client application should be modified to eliminate the warning
logging.warning() if there is nothing the client application can do about the situation, but the event should still be noted

=> those 2 warnings are clearly not user's fault (incorrect readme)

@HuggingFaceDocBuilderDev

It looks like you've updated code related to model or dataset cards in this PR.

Some content is duplicated among the following files. Please make sure that everything stays consistent.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

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

Thank you!

@Wauplin Wauplin merged commit eadbc00 into main Jan 15, 2024
17 checks passed
@Wauplin Wauplin deleted the 1978-log-warn-inconsistency branch January 15, 2024 14:54
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.

Inconsistent warning raising
3 participants