Update pre_build_script.sh #390
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.

When we merged #369 we completely got rid of any
requirements.txtwe had because we have no dependencies outside of torch. The torch dependency is also pulled defined directly inside asetup.pybecause it's an environment variable that will decide which version of pytorch we'll install.This passed CI just fine but then when the script was merged to main and the binary builds were triggered it broke all our binary builds
This is because in our binary build scripts in
packaging/we still runpip install -r requirements.txtand we also need to installpip install -r dev-requirements.txtbecause later in our post build validation we check we runpytest. Since therequirements.txtno longer exists the script fails.The reason why we didn't catch this in CI is because we don't run binary validation scripts per commit but we run it when code gets merged to main
In the future before making CI changes it's worth triggering a manual
workflow-dispatchto make sure this change is safe to landDoing a manual dispatch to make sure this passes before merging as I've done here https://github.com/pytorch/ao/actions/workflows/build_wheels_linux.yml