From d90dd18132ec42b95f2ecc9811eea8bfea576961 Mon Sep 17 00:00:00 2001 From: Eric Harper Date: Mon, 27 Nov 2023 17:38:06 -0700 Subject: [PATCH] add checks (#7943) Signed-off-by: eharper --- tests/collections/asr/decoding/rnnt_alignments_check.py | 2 ++ tests/collections/nlp/test_chat_sft_dataset.py | 1 + tests/collections/nlp/test_megatron.py | 2 +- tests/collections/nlp/test_nmt_model.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/collections/asr/decoding/rnnt_alignments_check.py b/tests/collections/asr/decoding/rnnt_alignments_check.py index 24000ff7ead7..2f19f78c6122 100644 --- a/tests/collections/asr/decoding/rnnt_alignments_check.py +++ b/tests/collections/asr/decoding/rnnt_alignments_check.py @@ -17,6 +17,7 @@ # these tests outside of the CI machines environment, where test data is # stored +import os import pytest from examples.asr.transcribe_speech import TranscriptionConfig from omegaconf import OmegaConf @@ -68,6 +69,7 @@ def cleanup_local_folder(): # TODO: add the same tests for multi-blank RNNT decoding +@pytest.mark.skipif(not os.path.exists('/home/TestData'), reason='Not a Jenkins machine') def test_rnnt_alignments(): # using greedy as baseline and comparing all other configurations to it ref_transcriptions = get_rnnt_alignments("greedy") diff --git a/tests/collections/nlp/test_chat_sft_dataset.py b/tests/collections/nlp/test_chat_sft_dataset.py index f7bcecaa3c28..bc44049f8f11 100644 --- a/tests/collections/nlp/test_chat_sft_dataset.py +++ b/tests/collections/nlp/test_chat_sft_dataset.py @@ -76,6 +76,7 @@ def create_data_points(mask_user, turn_num, records, temp_file, t2v, label=True) return data_points +@pytest.mark.skipif(not os.path.exists('/home/TestData'), reason='Not a Jenkins machine') class TestGPTSFTChatDataset: @classmethod def setup_class(cls): diff --git a/tests/collections/nlp/test_megatron.py b/tests/collections/nlp/test_megatron.py index 633d0ef70bb7..8206457ec6ee 100644 --- a/tests/collections/nlp/test_megatron.py +++ b/tests/collections/nlp/test_megatron.py @@ -62,7 +62,7 @@ def test_get_model(self): out = model.forward(*inp) typecheck.set_typecheck_enabled(enabled=True) - @pytest.mark.skipif(not os.path.exists('/home/TestData/nlp'), reason='Not a Jenkins machine') + @pytest.mark.skipif(not os.path.exists('/home/TestData'), reason='Not a Jenkins machine') @pytest.mark.with_downloads() @pytest.mark.run_only_on('GPU') @pytest.mark.unit diff --git a/tests/collections/nlp/test_nmt_model.py b/tests/collections/nlp/test_nmt_model.py index 432ba81fab0c..8076b57e3da2 100644 --- a/tests/collections/nlp/test_nmt_model.py +++ b/tests/collections/nlp/test_nmt_model.py @@ -110,7 +110,7 @@ def test_train_eval_loss(self): eval_loss = model.eval_loss_fn(log_probs=log_probs, labels=tgt_ids) assert torch.allclose(train_loss, eval_loss) - @pytest.mark.skipif(not os.path.exists('/home/TestData/nlp'), reason='Not a Jenkins machine') + @pytest.mark.skipif(not os.path.exists('/home/TestData'), reason='Not a Jenkins machine') @pytest.mark.run_only_on('GPU') @pytest.mark.unit def test_gpu_export_ts(self):