Skip to content

Commit

Permalink
Fix ExecuTorch pinned commit update failure (pytorch#117518)
Browse files Browse the repository at this point in the history
pytorch#117003 shows in interesting failure in which building ExecuTorch runner fails because it needs the change from pytorch#117378.  This reveals a chicken-and-egg bug in the job setup where building ExecuTorch runner depends on PyTorch and thus couldn't be part of the Docker image build where PyTorch is not yet available.  The failure happens because an outdated version of PyTorch is there on the Docker image.

So, like vision and audio, the step to build ExecuTorch runner needs to be done during test time.

I also fix the installation of vision and audio in ET job because they are now installed using PyTorch pinned commits as usual after pytorch/executorch#1247
Pull Request resolved: pytorch#117518
Approved by: https://github.com/larryliu0820, https://github.com/malfet
  • Loading branch information
huydhn authored and pytorchmergebot committed Jan 16, 2024
1 parent c30346d commit 99e5474
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/executorch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
663882fe7dc518c04adf3d2ee5ccb7d99f41ade4
2d39c223f23fbd6cc063e06f3374cb107e229a31
1 change: 0 additions & 1 deletion .ci/docker/common/install_executorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ setup_executorch() {

install_flatc_from_source
pip_install .
build_executorch_runner "cmake"

# Make sure that all the newly generate files are owned by Jenkins
chown -R jenkins .
Expand Down
15 changes: 9 additions & 6 deletions .ci/pytorch/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,17 @@ test_docs_test() {
}

test_executorch() {
echo "Install torchvision and torchaudio"
install_torchvision
install_torchaudio

pushd /executorch

echo "Install torchvision and torchaudio"
# TODO(huydhn): Switch this to the pinned commits on ExecuTorch once they are
# there. These libraries need to be built here, and not part of the Docker
# image because they require the target version of torch to be installed first
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git"
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/vision.git"
# NB: We need to build ExecuTorch runner here and not inside the Docker image
# because it depends on PyTorch
# shellcheck disable=SC1091
source .ci/scripts/utils.sh
build_executorch_runner "cmake"

echo "Run ExecuTorch regression tests for some models"
# NB: This is a sample model, more can be added here
Expand Down

0 comments on commit 99e5474

Please sign in to comment.