-
Notifications
You must be signed in to change notification settings - Fork 7.1k
torchhub tests are failing on CI #3664
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
Comments
Hmmm I can take a look later today, it's running fine in pytorch CI tho. Is it happening in vision CI? |
Yes, this is happening on all torchvision CIs, see #3662 for a recent example |
Looks like the GitHub API is limiting results per page to 30 by default, so |
@willclarktech @fmassa Yea my bad, was only testing the API on a small repo so didn't notice the number limit. I'll revert the PR first and work on a better fix! @willclarktech Good catch on missing tags on the original PR! I need to read github API more carefull to find a better fit :D |
@ailzhang This preview API seems to do exactly the check you want for commit hashes (although I'm not sure why it's important to restrict commits to branch heads): https://docs.github.com/en/rest/reference/repos#list-branches-for-head-commit. It doesn't cover tags obviously, but those don't introduce the same danger as commits. |
@willclarktech this API looks great! although it doesn't handle branch_name/tag_name where in those cases we don't have a commit_hash. Currently I'm just thinking about fixing it in the old way that fetching all the branches and tags and then check whether dst is listed in them. Wdyt? Btw restricting commits to branch heads is not a hard technical requirement, we just feel that it's easier for repo owner to manage if only a smaller set of commits are available to users. We can totally relax that if there's a request in the future. |
@ailzhang Fetching all branches and tags seems like the most straightforward option if you want to restrict commit hashes to branch heads (which you can get from the branches request). It definitely prevents commit hashes from forked repos, which is good. The restriction to branch heads seems odd to me: if I specified a commit to load I'd be surprised eg if my scripts all broke because somebody in that repo pushed to the branch. Git itself has functionality to check which (if any) branches a commit belongs to on a remote (whether at the branch head or not), but I didn't see a GitHub API endpoint that supports this. |
@willclarktech Re commit hash: we just feel that it's easier for repo owner to manage if only a smaller set of branches/tags are available to users. Actually branch_name/tag_name are used more frequently than commit hash in practice(which won't break if somebody pushed to the branch). We can totally relax that if there's a request in the future. |
@willclarktech Another reason that we prefer branch/tag head is that: |
@ailzhang I guess I find the reasoning confusing because in other contexts (eg installing a package via GitHub in poetry/npm/whatever) the use cases are typically something like this:
I don't have a specific use case here where I need a commit hash that's not at a branch head, just trying to give you some data on developer expectations - hope it's helpful. |
Closing the issue as this is now resolved on master. |
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug
For a few days already, torchhub tests have been failing with the following error message (as can be seen from https://app.circleci.com/pipelines/github/pytorch/vision/7408/workflows/5e29e045-7878-489f-8ff7-8bfe18d47e2a/jobs/511637)
We should fix this, this probably happens due to pytorch/pytorch#54451
cc @seemethere @ailzhang
The text was updated successfully, but these errors were encountered: