lightning/docker/tpu/tpu_test_cases.jsonnet

35 lines
814 B
Plaintext
Raw Normal View History

local base = import 'templates/base.libsonnet';
local tpus = import 'templates/tpus.libsonnet';
local utils = import "templates/utils.libsonnet";
local tputests = base.BaseTest {
frameworkPrefix: 'pl',
modelName: 'tpu-tests',
mode: 'postsubmit',
configMaps: [],
timeout: 900, # 15 minutes, in seconds.
image: std.extVar('image'),
imageTag: std.extVar('image-tag'),
tpuSettings+: {
softwareVersion: 'pytorch-nightly',
},
accelerator: tpus.v3_8,
command: utils.scriptCommand(
|||
cd pytorch-lightning
coverage run --source=pytorch_lightning -m pytest tests/models/test_tpu.py -v
test_exit_code=$?
echo "\n||| END PYTEST LOGS |||\n"
coverage xml
cat coverage.xml | tr -d '\t'
test $test_exit_code -eq 0
|||
),
};
tputests.oneshotJob