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
Feedback from #1146:
=> we are using both snake_case (fetch_config) and camelCase (securityStatus, cardData, lastModified) in the naming. This is surely done to match the backend naming but it makes huggingface_hub inconsistent.
list_models(filter=ModelFilter(filter=ModelSearchArguments().library.Transformers) feels weird to write
using direction was not obvious when using sort (list_models(sort="downloads")) (from @Wauplin : maybe using sort="-downloads") ?)
the sort options refers to all attributes of ModelInfo but all of them are not explicitly defined ("downloads" for example) => maybe we could enforce ModelInfo to define most up to date attributes ?
It felt weird to use a string "downloads" for sort, and an enum for filter
I would have imagined that the options as enums would all have been directly importable from the lib (not sure if feasible or if gotten dynamicaly from the hub)
I would have imagined able to use all strings everywhere (and be yelled at if the string was invalid with potential options).
I didn't need but expected more complex options like and or mecanism for filtering.
initilializing ModelSearchArguments() or DatasetSearchArguments() takes a long time since it requires to first list all models/datasets from the Hub. Kinda niche problem but it feels weird to loop through all models before making a search request to the Hub. => maybe we could still have this but promote the string-based method ?
All of this might not be tackled in a single PR but I'm dropping them all at once since they are related to the same topic.
The text was updated successfully, but these errors were encountered:
When I do [x for x in list_models(search="bert") if x.tags is not None] I get an empty list which means they all have None for the tags => have to set full=True.
Example in docs is broken. Update from @osanseviero: When using list_models with no filter, you don't get the full results. When using a filter you do get all the information (including tags) => so example is not broken (but behavior is not intuitive)
the full keyword should probably be mentioned on this page
Feedback from #1146:
=> we are using both snake_case (
fetch_config
) and camelCase (securityStatus
,cardData
,lastModified
) in the naming. This is surely done to match the backend naming but it makeshuggingface_hub
inconsistent.Feeback from @Narsil (on slack - internal link):
list_models(filter=ModelFilter(filter=ModelSearchArguments().library.Transformers)
feels weird to writedirection
was not obvious when usingsort
(list_models(sort="downloads")
) (from @Wauplin : maybe usingsort="-downloads")
?)ModelInfo
but all of them are not explicitly defined ("downloads" for example) => maybe we could enforceModelInfo
to define most up to date attributes ?Feedback from @Wauplin :
ModelSearchArguments()
orDatasetSearchArguments()
takes a long time since it requires to first list all models/datasets from the Hub. Kinda niche problem but it feels weird to loop through all models before making a search request to the Hub. => maybe we could still have this but promote the string-based method ?All of this might not be tackled in a single PR but I'm dropping them all at once since they are related to the same topic.
The text was updated successfully, but these errors were encountered: