You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Using a environment variable to provide the API token is not convenient. It is not always possible/desirable to edit config files (~/.bashrc, ~/.bash_profile, ~/.profile, ...) to export the API token. Consequently, I am forced to either
export my API token manually in every new terminal or
add my API token in clear in my scripts, which is a safety hazard.
Describe the solution you'd like
A way to login/save credentials from the CLI, that saves a file somewhere in the user space (~).
Describe alternatives you've considered
None.
Additional context
Currently, the quick guides in a new project show that it is possible to provide your API token in the (Python) code. I think this is not a good idea as beginners will very likely push that code to some repository.
The text was updated successfully, but these errors were encountered:
We are exploring more user-friendly methods for passing the API token to scripts. Meanwhile, can you try passing your API token as CLI args? It'll prevent your token from being exposed in the script, and you can use your terminal's history or reverse search to rerun scripts with the same token without exporting it manually.
We would also love to know if you could provide examples of tools that do this better ✅
Not every Python program is run from the terminal directly. In particular, on a Slurm cluster we have to write the python command in a shell script and launch it with sbatch. Then, giving the API key as an argument to the Python program means writing it in clear in the shell script.
W&B allows you to login (permanently) from CLI (wandb login) or from Python (from wanb import login).
Hugginface allows you to login (permanently) from CLI (huggingface-cli login) or from Python (from huggingface_hub import login).
In both cases a file containing the credentials is stored in the userspace.
Is your feature request related to a problem? Please describe.
Using a environment variable to provide the API token is not convenient. It is not always possible/desirable to edit config files (
~/.bashrc
,~/.bash_profile
,~/.profile
, ...) to export the API token. Consequently, I am forced to eitherDescribe the solution you'd like
A way to login/save credentials from the CLI, that saves a file somewhere in the user space (
~
).Describe alternatives you've considered
None.
Additional context
Currently, the quick guides in a new project show that it is possible to provide your API token in the (Python) code. I think this is not a good idea as beginners will very likely push that code to some repository.
The text was updated successfully, but these errors were encountered: