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

Prevent the CI from reusing old cached versions of setfit #235

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

tomaarsen
Copy link
Member

Resolves the issue from #234 (comment)

Hello!

Pull Request Overview

  • Regardless of whether the pip dependency cache is used or if the pip dependencies are installed fresh, always install setfit anew just prior to running the CI tests.

Details

#233 improved on the CI testing suite by (among other things) implementing pip dependency caching. However, as was experienced in this GitHub Action, whenever the pip dependency cache was used, older versions of setfit would be used in the newer tests. This caused very confusing test breakages, as new tests were ran with an old version of setfit.

See #234 (comment) for more details.

The changes

I tried various approaches in a PR on my fork, and discovered that the changes from this PR worked. I tested this by first pushing the commit from this PR, and letting the CI build a cache from that. Then, I pushed another commit that adds raise Exception() to the SetFitModel. As hoped, the test suite immediately picked up on that and failed, indicating that no old cached setfit version was being used, but only the newest version.

Furthermore, I'll git cherry-pick e29486f and make a new PR to reintroduce it. It was an unfortunate victim in this bug, as the caching bug made it seem like e29486f was broken, while it was not.

  • Tom Aarsen

@tomaarsen tomaarsen added bug Something isn't working CI Regarding the Continuous Integration labels Dec 14, 2022
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

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

Thanks for detailed analysis and for submitting a fix @tomaarsen - this looks good to me!

@lewtun lewtun merged commit 01ff536 into huggingface:main Dec 15, 2022
@tomaarsen tomaarsen deleted the bug/ci_cache branch December 15, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Regarding the Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants