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

bioclip --help output update #58

Closed
egrace479 opened this issue Oct 25, 2024 · 2 comments
Closed

bioclip --help output update #58

egrace479 opened this issue Oct 25, 2024 · 2 comments
Labels
question Further information is requested

Comments

@egrace479
Copy link
Member

The help output for the CLI has changed with the addition of alternate model options. Specifically:

bioclip predict -h produces:

usage: bioclip predict [-h] [--format {table,csv}] [--output OUTPUT]
                       [--rank {kingdom,phylum,class,order,family,genus,species} | --cls CLS | --bins BINS] [--k K] [--device DEVICE] [--model MODEL]
                       [--pretrained PRETRAINED]
                       image_file [image_file ...]

positional arguments:
  image_file            input image file(s)

options:
  -h, --help            show this help message and exit
  --format {table,csv}  format of the output, default: csv
  --output OUTPUT       print output to file, default: stdout
  --rank {kingdom,phylum,class,order,family,genus,species}
                        rank of the classification, default: species (when)
  --cls CLS             classes to predict: either a comma separated list or a path to a text file of classes (one per line), when specified the --rank
                        and --bins arguments are not allowed.
  --bins BINS           path to CSV file with two columns with the first being classes and second being bin names, when specified the --cls argument is
                        not allowed.
  --k K                 number of top predictions to show, default: 5
  --device DEVICE       device to use (cpu or cuda or mps), default: cpu
  --model MODEL         model identifier (see command list-models); default: hf-hub:imageomics/bioclip
  --pretrained PRETRAINED
                        pretrained model checkpoint as tag or file, depends on model; needed only if more than one is available (see command list-
                        models)

And bioclip embed -h returns

usage: bioclip embed [-h] [--output OUTPUT] [--device DEVICE] [--model MODEL] [--pretrained PRETRAINED] image_file [image_file ...]

positional arguments:
  image_file            input image file(s)

options:
  -h, --help            show this help message and exit
  --output OUTPUT       print output to file, default: stdout
  --device DEVICE       device to use (cpu or cuda or mps), default: cpu
  --model MODEL         model identifier (see command list-models); default: hf-hub:imageomics/bioclip
  --pretrained PRETRAINED
                        pretrained model checkpoint as tag or file, depends on model; needed only if more than one is available (see command list-
                        models)

We don't necessarily need to include the full options at the CLI section header, but I think it should be updated for predict and embed to match with image_file as a positional argument, and perhaps have a very simple note following it about the model options that links to the wiki.

I pulled up the help locally during the review and went back to the README curious about examples of those changes and realized the note on that is separated from the CLI help output which makes it look like it may be outdated and could potentially lead to confusion. Thoughts?

@egrace479 egrace479 added the question Further information is requested label Oct 25, 2024
@thompsonmj
Copy link
Contributor

I agree with the points above. Simple PR with updated menus and the wiki link for alternate models in #61.

@johnbradley
Copy link
Collaborator

This has been fixed by PR #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants