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

Clarify documentation on list_models's sort attribute #2527

Closed
aymeric-roucher opened this issue Sep 9, 2024 · 2 comments
Closed

Clarify documentation on list_models's sort attribute #2527

aymeric-roucher opened this issue Sep 9, 2024 · 2 comments

Comments

@aymeric-roucher
Copy link

aymeric-roucher commented Sep 9, 2024

It is possible to use the sort parameter from list_models with a duration, as in (excerpt from this example):

HfApi().list_models(filter="text-generation-inference", sort="likes7d", limit=5)

Currently the doc does not mention this option with duration: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.list_models
The key with which to sort the resulting models. Possible values are the properties of the [huggingface_hub.hf_api.ModelInfo](https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.ModelInfo) class.

It would be nice to add this mechanism to the doc with all possible values.

@julien-c
Copy link
Member

julien-c commented Sep 9, 2024

wdym by "duration"?

@Wauplin
Copy link
Contributor

Wauplin commented Sep 9, 2024

You can sort by "createdAt" if that's what you are looking for :)

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

No branches or pull requests

4 participants