Skip to content

Commit 7f3e9de

Browse files
authored
Fix TPU tests on master builds (#15349)
1 parent c287b5d commit 7f3e9de

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/tpu-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ jobs:
102102
kubectl logs -f $pod_name --container=train > /tmp/full_output.txt
103103
grep '<?xml version="1.0" ?>' /tmp/full_output.txt # sanity check
104104
csplit /tmp/full_output.txt '/<?xml version="1.0" ?>/'
105+
cat xx00 # test logs
105106
mv xx01 coverage.xml
106107
exit $status_code
107108
shell: bash

dockers/tpu-tests/tpu_test_cases.jsonnet

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ local tputests = base.BaseTest {
2929
echo "--- Fetch the SHA's changes ---"
3030
git clone --single-branch --depth 1 https://github.com/Lightning-AI/lightning.git
3131
cd lightning
32-
git fetch origin --depth 1 pull/{PR_NUMBER}/head:test/{PR_NUMBER}
33-
git -c advice.detachedHead=false checkout {SHA}
34-
35-
echo "--- Install PL ---"
36-
PACKAGE_NAME=pytorch FREEZE_REQUIREMENTS=1 pip install -e .[test]
32+
if [ -n "{PR_NUMBER}" ]; then # if PR number is not empty
33+
# PR triggered it, check it out
34+
git fetch origin --depth 1 pull/{PR_NUMBER}/head:test/{PR_NUMBER}
35+
git -c advice.detachedHead=false checkout {SHA}
36+
fi
37+
38+
echo "--- Install packages ---"
39+
PACKAGE_NAME=lite pip install -e .[dev]
40+
PACKAGE_NAME=pytorch pip install -e .[dev]
3741
pip list
3842
3943
echo $KUBE_GOOGLE_CLOUD_TPU_ENDPOINTS

0 commit comments

Comments
 (0)