question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a `token` attribute to `HfApi`

See original GitHub issue

Mentioned multiple times, last time in https://github.com/huggingface/huggingface_hub/issues/1094#issuecomment-1263349065.

The idea is to be able to set a token in the constructor of HfApi client object. This would avoid to pass the token to each method 1 by 1. This proposition is different than using notebook_login or huggingface-cli login as the token should not be persisted on disk.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adrinjalalicommented, Oct 11, 2022

I think @LysandreJik is referring to this one: https://github.com/huggingface/huggingface_hub/issues/796, which is almost a duplicate issue.

0reactions
Wauplincommented, Oct 17, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Hugging Face Hub API
Using the HfApi class directly enables you to configure the client. In particular, a token can be passed to be authenticated in all...
Read more >
huggingface_hub/hf_api.py at main · huggingface ... - GitHub
This attribute is present when `files_metadata` argument ... Otherwise, the token must be retrieved from cache or env variable. token=(token or self.token ......
Read more >
skorch.hf — skorch 0.12.1dev documentation - Read the Docs
Optional post-processor, mostly used to add special tokens for BERT etc. max_length : int (default=256). Maximum number of tokens used per sequence.
Read more >
Adding custom attributes to spaCy objects - YouTube
In this video, I'm going to show you how to add custom attributes to spaCy Token, Span and Doc objects.✨ Check out the...
Read more >
huggingface-hub Changelog - pyup.io
from huggingface_hub import HfApi. Token will be sent in every request but not stored on machine api = HfApi(token="hf_***") * Add token attribute...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found