diff --git a/tests/slow/test_grpo_slow.py b/tests/slow/test_grpo_slow.py index 047c3f9c04d..2e53abb4393 100644 --- a/tests/slow/test_grpo_slow.py +++ b/tests/slow/test_grpo_slow.py @@ -208,14 +208,14 @@ def test_training_with_transformers_paged(self, model_name): release_memory(model, trainer) - @require_flash_attn - @require_bitsandbytes - @require_peft @parameterized.expand( [ ("HuggingFaceTB/SmolVLM-Instruct",), # Only test the smaller model to avoid OOM ] ) + @require_flash_attn + @require_bitsandbytes + @require_peft def test_vlm_training(self, model_name): """ Test VLM training with aggressive memory optimization. diff --git a/tests/test_dpo_trainer.py b/tests/test_dpo_trainer.py index 7e0401a1d0c..fd4f7efb4d7 100644 --- a/tests/test_dpo_trainer.py +++ b/tests/test_dpo_trainer.py @@ -1303,7 +1303,6 @@ def test_train_with_length_desensitization(self): if param.sum() != 0: # ignore 0 biases self.assertFalse(torch.allclose(param, new_param, rtol=1e-12, atol=1e-12)) - @unittest.skipUnless(sys.version_info >= (3, 10), "Liger kernel is not supported on Python 3.9") @parameterized.expand( [ (0.1, "sigmoid"), @@ -1319,6 +1318,7 @@ def test_train_with_length_desensitization(self): ] ) @require_liger_kernel + @unittest.skipUnless(sys.version_info >= (3, 10), "Liger kernel is not supported on Python 3.9") def test_dpo_trainer_with_liger(self, beta, loss_type): """Test DPO trainer with Liger loss enabled across supported loss types. diff --git a/tests/test_grpo_trainer.py b/tests/test_grpo_trainer.py index a839a654bca..03d44e50603 100644 --- a/tests/test_grpo_trainer.py +++ b/tests/test_grpo_trainer.py @@ -1513,14 +1513,14 @@ def reward_func(completions, **kwargs): new_param = trainer.model.get_parameter(n) self.assertFalse(torch.equal(param, new_param), f"Parameter {n} has not changed.") - @require_vision - @require_vllm @parameterized.expand( [ ("trl-internal-testing/tiny-Qwen2_5_VLForConditionalGeneration",), ("trl-internal-testing/tiny-Gemma3ForConditionalGeneration",), ] ) + @require_vision + @require_vllm @unittest.skip("We should add a mock for the vLLM server.") def test_training_vlm_and_vllm(self, model_id) -> None: dataset = load_dataset("trl-internal-testing/zen-image", "conversational_prompt_only", split="train") diff --git a/tests/test_online_dpo_trainer.py b/tests/test_online_dpo_trainer.py index 336db8a089f..b9dec1135e6 100644 --- a/tests/test_online_dpo_trainer.py +++ b/tests/test_online_dpo_trainer.py @@ -238,8 +238,8 @@ def test_training_with_peft_model_and_peft_config(self): # Check if training loss is available self.assertIn("train_loss", trainer.state.log_history[-1]) - @require_llm_blender @parameterized.expand([("standard_prompt_only",), ("conversational_prompt_only",)]) + @require_llm_blender def test_training_with_judge(self, config_name): training_args = OnlineDPOConfig( output_dir=self.tmp_dir, @@ -419,8 +419,8 @@ def test_generation_config_setup(self): self.assertEqual(trainer.generation_config.max_new_tokens, 64) self.assertFalse(trainer.generation_config.do_sample) # From generation_kwargs - @require_torch_accelerator @parameterized.expand([("standard_prompt_only",), ("conversational_prompt_only",)]) + @require_torch_accelerator def test_training_with_transformers_paged(self, config_name): if Version(transformers.__version__) < Version("4.57.0"): pytest.xfail("Upstream bug in transformers (GH#40692). Fix merged; awaiting release >= 4.57.0") diff --git a/tests/test_rloo_trainer.py b/tests/test_rloo_trainer.py index cde52de6047..a2b1d3bf8b7 100644 --- a/tests/test_rloo_trainer.py +++ b/tests/test_rloo_trainer.py @@ -1254,14 +1254,14 @@ def reward_func(completions, **kwargs): new_param = trainer.model.get_parameter(n) self.assertFalse(torch.equal(param, new_param), f"Parameter {n} has not changed.") - @require_vision - @require_vllm @parameterized.expand( [ ("trl-internal-testing/tiny-Qwen2_5_VLForConditionalGeneration",), ("trl-internal-testing/tiny-Gemma3ForConditionalGeneration",), ] ) + @require_vision + @require_vllm @unittest.skip("We should add a mock for the vLLM server.") def test_training_vlm_and_vllm(self, model_id) -> None: dataset = load_dataset("trl-internal-testing/zen-image", "conversational_prompt_only", split="train") diff --git a/tests/test_xpo_trainer.py b/tests/test_xpo_trainer.py index 9d50b542a03..9af803830cf 100644 --- a/tests/test_xpo_trainer.py +++ b/tests/test_xpo_trainer.py @@ -184,8 +184,8 @@ def test_training_pre_pefted_model_implicit_ref(self): self.assertIn("train_loss", trainer.state.log_history[-1]) - @require_llm_blender @parameterized.expand([("standard_prompt_only",), ("conversational_prompt_only",)]) + @require_llm_blender def test_xpo_trainer_judge_training(self, config_name): training_args = XPOConfig( output_dir=self.tmp_dir,