-
Notifications
You must be signed in to change notification settings - Fork 580
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
Option to get security status with hf_api
#2649
Comments
Hi @suzukimain, the |
I'm sorry, my previous explanation was insufficient. The feature I want to request is an option to directly obtain from huggingface_hub import HfApi
hf_api = HfApi()
hf_info = list(hf_api.list_models(filter="google"))
model_info = hf_info[0].__dict__
security_repo_status = model_info["security_repo_status"]
print(f"security_repo_status: {security_repo_status}")
print(f"keys: {model_info.keys()}")
# security_repo_status: None
# keys: dict_keys(['id', 'author', 'sha', 'last_modified', 'created_at', 'private', 'gated', 'disabled', 'downloads', 'downloads_all_time', 'likes', 'library_name', 'gguf', 'inference', 'tags', 'pipeline_tag', 'mask_token', 'trending_score', 'card_data', 'widget_data', 'model_index', 'config', 'transformers_info', 'siblings', 'spaces', 'safetensors', 'security_repo_status', 'lastModified', 'cardData', 'transformersInfo', '_id', 'modelId']) |
In #2638 (comment) @hanouticelina showed how to leverage the |
@Wauplin I think the issue pointed here is that the endpoint @suzukimain For now, you can work around this by iterating through the list of models and call |
Hi @suzukimain, the backend team confirmed that including The recommendation is to retrieve this information on a case-by-case basis by querying model info individually: from huggingface_hub import HfApi
api = HfApi()
api.model_info("your_model_id", securityStatus=True) thanks a lot for your understanding! I will close this issue but don't hesitate to comment or open a new one if you have any other question or feature request 🤗 |
Is your feature request related to a problem? Please describe.
There is no option to get
securityStatus
inlist_models
Describe the solution you'd like
I would like to request an option in
list_models
likesecurityStatus
inmodel_info
Describe alternatives you've considered
After getting the repo id in
list_models
, I get it insecurityStatus
ofmodel_info
Additional context
I am thinking of making a feature request to the api-inference-community as well, if necessary.
The text was updated successfully, but these errors were encountered: