huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
2.12k stars 556 forks source link

add support for a version command #2441

Closed remyleone closed 2 months ago

remyleone commented 3 months ago

Is your feature request related to a problem? Please describe.

I would like to know the version of the CLI I use using only a version command.

Describe the solution you'd like

$ huggingface-cli version
huggingface_hub version: 0.17.3

Or

$ huggingface-cli version
0.17.3

Describe alternatives you've considered

Using $ huggingface-cli env but it is not as clear and straightforward to think about the environment to fetch the version of the CLI.

Additional context Add any other context or screenshots about the feature request here.

julien-c commented 3 months ago

good idea (assuming it's not already there), do you want to open a PR? 🔥

Wauplin commented 3 months ago

This is indeed not already there. Community PR is very welcome :) It would consists in printing the huggingface_hub.__version__ value.

010kim commented 3 months ago

Hello! Can I work on this issue? Unless @remyleone is working on it already, I would love to create a PR!

remyleone commented 3 months ago

Go for it 😊

WizKnight commented 3 months ago

@Wauplin Hey there! 👋 I'm new to this repository and excited to learn and contribute. Please let me know if there are any good starting points or tasks where I can be of assistance. And as I can see @010kim is already working on this issue.

Wauplin commented 3 months ago

Hi @WizKnight :hugs: Glad to hear that! Issues labelled as https://github.com/huggingface/huggingface_hub/labels/good%20first%20issue are usually a good start when starting to contribute to a repository. Before starting anything, we have a contributing guide with some guidance to help you getting started that we recommend to read.

A good first issue could be https://github.com/huggingface/huggingface_hub/issues/1172. @dankornas mentioned they would work on it but given it has been a few months, I think you can take it over. You can start with a first PR to update constants in hf_api.py. Once reviewed and merged, you'll be able to do all the other modules the same way.

Thanks! :hugs:

WizKnight commented 3 months ago

@Wauplin Alright, I'm on it!

Cheers! 🤗

Wauplin commented 2 months ago

Closed by https://github.com/huggingface/huggingface_hub/pull/2498. Thanks @010kim !