- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3k
Support huggingface_hub v0.x and v1.x #7783
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
          
     Merged
      
      
    
      
        
          +139
        
        
          −121
        
        
          
        
      
    
  
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            34 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      7873621
              
                Let's test like this
              
              
                Wauplin 07b3a9d
              
                code quality
              
              
                Wauplin 532e507
              
                add back requests
              
              
                Wauplin fe845fb
              
                install transformers from source
              
              
                Wauplin 0b1d915
              
                t :wq
              
              
                Wauplin 8b5e0f3
              
                will it work?
              
              
                Wauplin 09ac910
              
                to remove later: don't fail fast
              
              
                Wauplin bb92173
              
                don't fail fast
              
              
                Wauplin bd6945c
              
                fix test fixture
              
              
                Wauplin ac365fa
              
                fix OfflineModeIsEnabled test
              
              
                Wauplin 248b052
              
                huggingface_hub 1.0.0 even if deps latest
              
              
                Wauplin 167882c
              
                will be broken but better
              
              
                Wauplin 3c7c555
              
                pip list in CI
              
              
                Wauplin 67f8d2a
              
                revert branch
              
              
                Wauplin 9a23ff5
              
                install latest only in latest tests
              
              
                Wauplin 9efbb02
              
                offline
              
              
                Wauplin 48e55a4
              
                get back to normal
              
              
                Wauplin ac0366d
              
                better
              
              
                Wauplin 01fd011
              
                ofc
              
              
                Wauplin 6a7151e
              
                why not
              
              
                Wauplin b799352
              
                as before
              
              
                Wauplin 784256c
              
                this time is good
              
              
                Wauplin f7dcf49
              
                fix yaml format
              
              
                Wauplin ace01a3
              
                system
              
              
                Wauplin a472f80
              
                fix import in o.x
              
              
                Wauplin f4f0f6e
              
                :/
              
              
                Wauplin 83e3d2c
              
                Bump minimal version to 0.25.0
              
              
                Wauplin e39a04d
              
                x-compatible offline helper
              
              
                Wauplin d6e6dbc
              
                code quality
              
              
                Wauplin e94c469
              
                fix utils tests
              
              
                Wauplin f9f2f00
              
                fixing last bits
              
              
                Wauplin 50f40c2
              
                x-version compat
              
              
                Wauplin e200c23
              
                Merge branch 'main' into ci-test-huggingface-hub-v1.0.0.rc0
              
              
                Wauplin 7903f24
              
                final commit
              
              
                Wauplin File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,14 +1,6 @@ | ||
| from functools import partial | ||
|  | ||
| from huggingface_hub import hf_hub_url | ||
| from huggingface_hub.utils import get_session, hf_raise_for_status | ||
|  | ||
|  | ||
| hf_dataset_url = partial(hf_hub_url, repo_type="dataset") | ||
|  | ||
|  | ||
| def check_auth(hf_api, repo_id, token=None): | ||
| headers = hf_api._build_hf_headers(token=token) | ||
| path = f"{hf_api.endpoint}/api/datasets/{repo_id}/auth-check" | ||
| r = get_session().get(path, headers=headers) | ||
| hf_raise_for_status(r) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping to 0.25.0 to be able to use
update_repo_settingsin tests. Honestly not a big breaking change IMO (dates back to Sept. 2024)