-
Notifications
You must be signed in to change notification settings - Fork 572
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
AttributeError: 'ModelInfo' object has no attribute 'securityStatus' #1002
Comments
Iirc, we've seen this in the past because the staging Hub does not have security status on it, which leads to the issues you mention. |
@osanseviero ok, good to know. |
I isolated the issue and reported it to moon-landing (private link). Doesn't seem to be related to |
In that situation, we can likely just skip the failing test so that we still have green ticks on new PRs until the issue is resolved and keep this issue open to track it; imo this is especially important to continue having (alarming) red ticks otherwise, so that we pay attention to what might be failing rather than trusting it's the test that always fails. WDYT @Wauplin? |
Makes total sense @LysandreJik ! I'll take care of it :) My "let's just ignore the failing test :/" seems so lazy now that I read it again 😁 |
@LysandreJik I just created the PR to skip the test. Not related to the bug but mentioned in my first comment, do you have an opinion about setting |
Adding it with a default value of |
Describe the bug
Occasionally, a test fails in CI with the error
AttributeError: 'ModelInfo' object has no attribute 'securityStatus'
.It also happened to me once on my local machine and I was able debug it a bit more. The error came from the fact that the model info was returned by the server without a
securityStatus
field, even thoughsecurityStatus
is set to True in the test (see log below).2 unrelated things here:
Some tests are occasionally failing because of a server error while running the tests. It seems that test stability has been successfully addressed in Improve tests and logging #682. However, the
retry_endpoint
decorator cannot work here because it's not a classic HTTPError but a more pernicious error where the server returns something but not with the expected content. Any idea what could cause that ?When
securityStatus
is not returned by the server,ModelInfo
does not have the attribute at all because of the following hack:I remember that I read somewhere this is because we want older versions of
huggingface_hub
to still contain future informations, which is a good reason for having it.However, since this attribute is now expected and even tested (see this test), I would be favorable to add it as a permanent attribute to
ModelInfo
(with a default value toNone
for example).Reproduction
Happens occasionally. See https://github.com/huggingface/huggingface_hub/runs/7918045010?check_suite_focus=true for example.
Logs
System Info
Github CI (commit 3ce9e18129f690be1c528c9cd1d13bc37a58aab5 for example)
The text was updated successfully, but these errors were encountered: