Prevent the CI from reusing old cached versions of setfit
#235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves the issue from #234 (comment)
Hello!
Pull Request Overview
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 theSetFitModel
. 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.