Skip to content

Commit

Permalink
Fix TPU tests on master builds (#15349)
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca authored Oct 31, 2022
1 parent c287b5d commit 7f3e9de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
kubectl logs -f $pod_name --container=train > /tmp/full_output.txt
grep '<?xml version="1.0" ?>' /tmp/full_output.txt # sanity check
csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/'
cat xx00 # test logs
mv xx01 coverage.xml
exit $status_code
shell: bash
Expand Down
14 changes: 9 additions & 5 deletions dockers/tpu-tests/tpu_test_cases.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ local tputests = base.BaseTest {
echo "--- Fetch the SHA's changes ---"
git clone --single-branch --depth 1 https://github.com/Lightning-AI/lightning.git
cd lightning
git fetch origin --depth 1 pull/{PR_NUMBER}/head:test/{PR_NUMBER}
git -c advice.detachedHead=false checkout {SHA}
echo "--- Install PL ---"
PACKAGE_NAME=pytorch FREEZE_REQUIREMENTS=1 pip install -e .[test]
if [ -n "{PR_NUMBER}" ]; then # if PR number is not empty
# PR triggered it, check it out
git fetch origin --depth 1 pull/{PR_NUMBER}/head:test/{PR_NUMBER}
git -c advice.detachedHead=false checkout {SHA}
fi
echo "--- Install packages ---"
PACKAGE_NAME=lite pip install -e .[dev]
PACKAGE_NAME=pytorch pip install -e .[dev]
pip list
echo $KUBE_GOOGLE_CLOUD_TPU_ENDPOINTS
Expand Down

0 comments on commit 7f3e9de

Please sign in to comment.