File tree Expand file tree Collapse file tree
sagemaker-train/tests/integ/train Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ def test_benchmark_subtasks_validation(self):
289289 logger .info ("Subtask validation tests passed" )
290290
291291 @pytest .mark .skip (reason = "Pipeline creation fails - under investigation" )
292+ @pytest .mark .gpu_intensive
292293 def test_benchmark_evaluation_base_model_only (self ):
293294 """
294295 Test benchmark evaluation with base model only (no fine-tuned model).
Original file line number Diff line number Diff line change 2222 EvaluationPipelineExecution ,
2323)
2424
25- pytestmark = pytest .mark .gpu_intensive
26-
2725# Configure logging
2826logging .basicConfig (
2927 level = logging .INFO ,
@@ -237,6 +235,7 @@ def test_custom_scorer_evaluator_validation(self):
237235 logger .info ("Validation tests passed" )
238236
239237 # @pytest.mark.skip(reason="Built-in metric evaluation - to be enabled when needed")
238+ @pytest .mark .gpu_intensive
240239 def test_custom_scorer_with_builtin_metric (self ):
241240 """
242241 Test custom scorer evaluation with built-in metric.
Original file line number Diff line number Diff line change 2121from sagemaker .train .common import TrainingType
2222import pytest
2323
24- pytestmark = pytest .mark .gpu_intensive
25-
26-
24+ @pytest .mark .gpu_intensive
2725def test_dpo_trainer_lora_complete_workflow (sagemaker_session ):
2826 """Test complete DPO training workflow with LORA."""
2927 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -64,6 +62,7 @@ def test_dpo_trainer_lora_complete_workflow(sagemaker_session):
6462 assert training_job .output_model_package_arn is not None
6563
6664
65+ @pytest .mark .gpu_intensive
6766def test_dpo_trainer_with_validation_dataset (sagemaker_session ):
6867 """Test DPO trainer with both training and validation datasets."""
6968 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
Original file line number Diff line number Diff line change 2828 EvaluationPipelineExecution ,
2929)
3030
31- pytestmark = pytest .mark .gpu_intensive
32-
3331# Configure logging
3432logging .basicConfig (
3533 level = logging .INFO ,
Original file line number Diff line number Diff line change 2222 EvaluationPipelineExecution ,
2323)
2424
25- pytestmark = pytest .mark .gpu_intensive
26-
2725# Configure logging
2826logging .basicConfig (
2927 level = logging .INFO ,
Original file line number Diff line number Diff line change 2121from sagemaker .train .common import TrainingType
2222import pytest
2323
24- pytestmark = pytest .mark .gpu_intensive
25-
26-
24+ @pytest .mark .gpu_intensive
2725def test_rlaif_trainer_lora_complete_workflow (sagemaker_session ):
2826 """Test complete RLAIF training workflow with LORA."""
2927 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -65,6 +63,7 @@ def test_rlaif_trainer_lora_complete_workflow(sagemaker_session):
6563 assert training_job .output_model_package_arn is not None
6664
6765
66+ @pytest .mark .gpu_intensive
6867def test_rlaif_trainer_with_custom_reward_settings (sagemaker_session ):
6968 """Test RLAIF trainer with different reward model and prompt."""
7069 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -105,6 +104,7 @@ def test_rlaif_trainer_with_custom_reward_settings(sagemaker_session):
105104 assert training_job .output_model_package_arn is not None
106105
107106
107+ @pytest .mark .gpu_intensive
108108def test_rlaif_trainer_continued_finetuning (sagemaker_session ):
109109 """Test complete RLAIF training workflow with LORA."""
110110 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
Original file line number Diff line number Diff line change 2121from sagemaker .train .rlvr_trainer import RLVRTrainer
2222from sagemaker .train .common import TrainingType
2323
24- pytestmark = pytest .mark .gpu_intensive
25-
26-
24+ @pytest .mark .gpu_intensive
2725def test_rlvr_trainer_lora_complete_workflow (sagemaker_session ):
2826 """Test complete RLVR training workflow with LORA."""
2927 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -63,6 +61,7 @@ def test_rlvr_trainer_lora_complete_workflow(sagemaker_session):
6361 assert training_job .output_model_package_arn is not None
6462
6563
64+ @pytest .mark .gpu_intensive
6665def test_rlvr_trainer_with_custom_reward_function (sagemaker_session ):
6766 """Test RLVR trainer with custom reward function."""
6867 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -102,6 +101,7 @@ def test_rlvr_trainer_with_custom_reward_function(sagemaker_session):
102101 assert training_job .output_model_package_arn is not None
103102
104103
104+ @pytest .mark .gpu_intensive
105105@pytest .mark .skip (reason = "TODO: Nova test to be enabled in us-east-1" )
106106def test_rlvr_trainer_nova_workflow (sagemaker_session_us_east_1 ):
107107 """Test RLVR training workflow with Nova model."""
Original file line number Diff line number Diff line change 2121from sagemaker .train .sft_trainer import SFTTrainer
2222from sagemaker .train .common import TrainingType
2323
24- pytestmark = pytest .mark .gpu_intensive
25-
26-
24+ @pytest .mark .gpu_intensive
2725def test_sft_trainer_lora_complete_workflow (sagemaker_session ):
2826 """Test complete SFT training workflow with LORA."""
2927 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -61,6 +59,7 @@ def test_sft_trainer_lora_complete_workflow(sagemaker_session):
6159 assert training_job .output_model_package_arn is not None
6260
6361
62+ @pytest .mark .gpu_intensive
6463def test_sft_trainer_with_validation_dataset (sagemaker_session ):
6564 """Test SFT trainer with both training and validation datasets."""
6665 unique_id = f"{ int (time .time ())} -{ random .randint (1000 , 9999 )} "
@@ -96,6 +95,7 @@ def test_sft_trainer_with_validation_dataset(sagemaker_session):
9695 assert hasattr (training_job , 'output_model_package_arn' )
9796
9897
98+ @pytest .mark .gpu_intensive
9999@pytest .mark .skip (reason = "TODO: Nova test to be enabled in us-east-1" )
100100def test_sft_trainer_nova_workflow (sagemaker_session_us_east_1 ):
101101 """Test SFT trainer with Nova model."""
Original file line number Diff line number Diff line change 2929from sagemaker .train .distributed import Torchrun
3030from sagemaker .train .tuner import HyperparameterTuner
3131
32- pytestmark = pytest .mark .gpu_intensive
3332from sagemaker .core .parameter import ContinuousParameter
3433
3534logger = logging .getLogger (__name__ )
You can’t perform that action at this time.
0 commit comments