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

feat: Support authentication with HuggingFace login #17881

Merged
merged 5 commits into from
Jul 26, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jul 26, 2024

ref huggingface/dataset-viewer#2997 (review)
ref huggingface/hub-docs#1345 (comment)

Support a login mechanism Hugging Face uses that stores the token in a file under $HF_HOME/token.

We attempt to source the token in the following order:

  • storage_options passed to pl.(scan|read)_(...)
  • HF_TOKEN environment variable
  • $HF_HOME/token on the filesystem

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jul 26, 2024
@nameexhaustion nameexhaustion marked this pull request as ready for review July 26, 2024 05:19
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 80.47%. Comparing base (2a6ebec) to head (4c91ae1).

Files Patch % Lines
crates/polars-io/src/cloud/options.rs 0.00% 40 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17881      +/-   ##
==========================================
- Coverage   80.48%   80.47%   -0.01%     
==========================================
  Files        1507     1507              
  Lines      197610   197640      +30     
  Branches     2813     2813              
==========================================
+ Hits       159040   159046       +6     
- Misses      38049    38073      +24     
  Partials      521      521              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit e0b4012 into pola-rs:main Jul 26, 2024
21 checks passed
@nameexhaustion nameexhaustion deleted the hf-login branch July 28, 2024 10:59
@c-peters c-peters added the accepted Ready for implementation label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants