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

Remove huggingface warning #540

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Remove huggingface warning #540

merged 1 commit into from
Jan 7, 2025

Conversation

ericcurtin
Copy link
Collaborator

@ericcurtin ericcurtin commented Jan 7, 2025

It prints on all usages of huggingface, it's ugly.

We don't really need huggingface-cli for most usages of hf, this suggests we do.

Summary by Sourcery

Remove the warning about the huggingface CLI not being available.

Bug Fixes:

  • Removed the warning message displayed when the huggingface CLI is not available.

Enhancements:

  • Removed the check for huggingface CLI availability.

Copy link
Contributor

sourcery-ai bot commented Jan 7, 2025

Reviewer's Guide by Sourcery

This pull request removes the warning about huggingface-cli not being available by removing the check for huggingface-cli and the associated warning message.

Class diagram showing the removal of huggingface-cli check

classDiagram
    class HuggingFaceModel {
        -String model
        -String directory
        -String filename
        -Boolean hf_cli_available (removed)
        +login(args)
    }
    note for HuggingFaceModel "Removed hf_cli_available check"
Loading

File-Level Changes

Change Details Files
Removed the check for huggingface-cli and the associated warning message.
  • Removed the hf_cli_available check in the __init__ method.
  • Removed the warning message that was displayed if hf_cli_available was false.
  • Removed the is_huggingface_cli_available import statement.
ramalama/huggingface.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ericcurtin - I've reviewed your changes - here's some feedback:

Overall Comments:

  • This change will cause a NameError in the login method since self.hf_cli_available is used but no longer initialized. Please either remove all huggingface-cli dependencies or keep the availability check.
  • Please provide a more detailed explanation of why this change is needed and how it improves the codebase.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ericcurtin ericcurtin force-pushed the warning branch 2 times, most recently from d831da2 to 5495ff0 Compare January 7, 2025 13:06
It prints on all usages of huggingface, it's ugly.

We don't really need huggingface-cli for most usages of hf, this
suggests we do.

Signed-off-by: Eric Curtin <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Jan 7, 2025

LGTM

@rhatdan rhatdan merged commit adc842d into main Jan 7, 2025
11 checks passed
@ericcurtin ericcurtin deleted the warning branch January 7, 2025 13:35
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