Skip to content

Commit 089c361

Browse files
authored
Merge pull request instructlab#1061 from hickeyma/fix/add-flag-help
Fix: Add help string to hf-token flag in download
2 parents 503bc13 + 9c8e0b1 commit 089c361

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/instructlab/lab.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -709,14 +709,20 @@ def chat(
709709
show_default=True,
710710
help="The local directory to download the model files into.",
711711
)
712-
@click.option("--hf-token", envvar="HF_TOKEN")
712+
@click.option(
713+
"--hf-token",
714+
envvar="HF_TOKEN",
715+
help="User access token for connecting to the Hugging Face Hub.",
716+
)
713717
@click.pass_context
714718
def download(ctx, repository, release, filename, model_dir, hf_token):
715719
"""Download the model(s) to train"""
716720
click.echo(f"Downloading model from {repository}@{release} to {model_dir}...")
717721
if hf_token == "" and "instructlab" not in repository:
718722
raise ValueError(
719-
"HF_TOKEN var needs to be set in your environment to download HF Model. The HF Token is used to authenticate your identity to the Hugginface Hub."
723+
"""HF_TOKEN var needs to be set in your environment to download HF Model.
724+
Alternatively, the token can be passed with --hf-token flag.
725+
The HF Token is used to authenticate your identity to the Hugging Face Hub."""
720726
)
721727
try:
722728
if ctx.obj is not None:

0 commit comments

Comments
 (0)