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

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Sep 1, 2022

Fix #1002. See #1002 (comment).

Since securityStatus can be explicitly requested by a user, let's add it to the default ModelInfo class.

Note: it was already implicitly added when returned by the server (see code below from __init__ and discussed here) but not default to None if not returned.

        for k, v in kwargs.items():
            setattr(self, k, v)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 1, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

src/huggingface_hub/hf_api.py Outdated Show resolved Hide resolved
Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #1026 (2892a05) into main (c03bd29) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1026   +/-   ##
=======================================
  Coverage   82.18%   82.18%           
=======================================
  Files          35       35           
  Lines        3592     3593    +1     
=======================================
+ Hits         2952     2953    +1     
  Misses        640      640           
Impacted Files Coverage Δ
src/huggingface_hub/hf_api.py 86.86% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Wauplin Wauplin merged commit 0f2c286 into main Sep 1, 2022
@Wauplin Wauplin deleted the 1002-add-security-status-to-model-info branch September 1, 2022 12:26
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

Successfully merging this pull request may close these issues.

AttributeError: 'ModelInfo' object has no attribute 'securityStatus'
3 participants