[CI] clear ~/.cache/torch_extensions
between builds
#14520
Merged
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.
This PR is trying to address CI failures with pt-nightly. https://github.com/huggingface/transformers/runs/4280926354?check_suite_focus=true
~/.cache/torch_extensions/
currently uses a single hardcoded path to install all custom cuda extensions and so when it was built with pt-1.8 but then attempted to be used with pt-nightly (pt-1.11-to-be), the following happens:pt-1.10 has improved the situation by adding a prefix:
~/.cache/torch_extensions/py38_cu113
which makes the builds not shared between different cuda and python versions, but it missed the crucial pt-version in that prefix. I reported the issue here:pytorch/pytorch#68905
And of course ideally all the builds should be installed into the virtual python environment and not have a global shared dir.
This PR tries to address the issue by wiping out
~/.cache/torch_extensions/
completely when CI starts.This of course means
deepspeed
will rebuild the extensions on every CI run, but this is actually a good thing, because then we really test the right version of it. It does it really fast so it shouldn't introduce a large overhead.@LysandreJik