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

Add securityStatus to ModelInfo object with default value None. #1026

Merged
merged 2 commits into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class ModelInfo:
repo sha at this particular revision
lastModified (`str`, *optional*):
date of last commit to repo
tags (`Listr[str]`, *optional*):
tags (`List[str]`, *optional*):
List of tags.
pipeline_tag (`str`, *optional*):
Pipeline tag to identify the correct widget.
Expand All @@ -237,6 +237,9 @@ class ModelInfo:
repo author
config (`Dict`, *optional*):
Model configuration information
securityStatus (`Dict`, *optional*):
Security status of the model.
Example: `{"containsInfected": False}`
kwargs (`Dict`, *optional*):
Kwargs that will be become attributes of the class.
"""
Expand All @@ -253,6 +256,7 @@ def __init__(
private: bool = False,
author: Optional[str] = None,
config: Optional[Dict] = None,
securityStatus: Optional[Dict] = None,
**kwargs,
):
self.modelId = modelId
Expand All @@ -266,6 +270,7 @@ def __init__(
self.private = private
self.author = author
self.config = config
self.securityStatus = securityStatus
for k, v in kwargs.items():
setattr(self, k, v)

Expand Down