-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
Fix test_pipelines_video_classification that was always failing #35842
Fix test_pipelines_video_classification that was always failing #35842
Conversation
cc @ydshieh, can you confirm this test was failing? |
@CalOmnie I am not able to see Could you provide a link to a job run page where this test is failing or a full command that run a specific test that shows this failure? |
Hey @ydshieh thanks for taking the time to go over this PR. I shared this command in the PR description but I probably should have made a dedicated section for it, I ran the tests using:
I assume it is not part of your automated testing, or it would have been found earlier. That or an issue with my own environment. |
OK, it should be This test is indeed failing on |
I find the docstring for Return:
A dictionary or a list of dictionaries containing result. If the input is a single video, will return a
dictionary, if the input is a list of several videos, will return a list of dictionaries corresponding to
the videos. Even with a single video (path string), the returned value is still a list of dictionary instead of the mentioned @CalOmnie Would you like to double check this part and update the docstring if necessary? @Rocketknight1 The changes in this PR LGTM. |
@ydshieh Apologies for the wrong path. I updated the docstring to reflect that the pipeline now returns |
@Rocketknight1 Maybe you can double check the change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ydshieh the changes in the actual pipeline are just docstring edits, and I think the new docstring is more correct, so I'm happy to approve this!
…ggingface#35842) * Fix test_pipelines_video_classification that was always failing * Update video pipeline docstring to reflect actual return type --------- Co-authored-by: Louis Groux <louis.cal.groux@gmail.com>
…ggingface#35842) * Fix test_pipelines_video_classification that was always failing * Update video pipeline docstring to reflect actual return type --------- Co-authored-by: Louis Groux <louis.cal.groux@gmail.com>
What does this PR do?
tests/test_pipelines_video_classification.py
was always failing because the output of the video classifier, when run with one file path (as opposed to a list), is returning alist[dict]
whereas the testing code was expecting alist[list[dict]]
, this PR corrects that assumption.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
It would be nice if someone could check that
pytest tests/test_pipelines_video_classification.py
actually fails for them too, it is possible that the issue comes from my environment