@@ -329,11 +329,11 @@ def reward_func(prompts, completions, **kwargs):
329329            assert  lora_params_changed , "No LoRA parameters were updated during training." 
330330
331331        except  torch .OutOfMemoryError  as  e :
332-             self . skipTest (f"Skipping VLM training test due to insufficient GPU memory: { e }  )
332+             pytest . skip (f"Skipping VLM training test due to insufficient GPU memory: { e }  )
333333        except  Exception  as  e :
334334            # Check for other memory-related errors 
335335            if  any (keyword  in  str (e ).lower () for  keyword  in  ["memory" , "cuda" , "out of memory" , "insufficient" ]):
336-                 self . skipTest (f"Skipping VLM training test due to hardware constraints: { e }  )
336+                 pytest . skip (f"Skipping VLM training test due to hardware constraints: { e }  )
337337            else :
338338                raise 
339339
@@ -474,11 +474,11 @@ def dummy_reward_func(completions, **kwargs):
474474                            "decrease gpu memory" ,
475475                        ]
476476                    ):
477-                         self . skipTest (f"Skipping vLLM colocate test due to hardware constraints: { e }  )
477+                         pytest . skip (f"Skipping vLLM colocate test due to hardware constraints: { e }  )
478478                    elif  "KeyError"  in  str (e ) and  "RANK"  in  str (e ):
479-                         self . skipTest (f"Skipping vLLM colocate test due to environment setup issues: { e }  )
479+                         pytest . skip (f"Skipping vLLM colocate test due to environment setup issues: { e }  )
480480                    elif  "ValueError"  in  str (e ) and  "memory"  in  str (e ).lower ():
481-                         self . skipTest (f"Skipping vLLM colocate test due to memory constraints: { e }  )
481+                         pytest . skip (f"Skipping vLLM colocate test due to memory constraints: { e }  )
482482                    else :
483483                        raise 
484484        finally :
@@ -541,11 +541,11 @@ def test_training_vllm(self):
541541                    "decrease gpu memory" ,
542542                ]
543543            ):
544-                 self . skipTest (f"Skipping vLLM training test due to hardware constraints: { e }  )
544+                 pytest . skip (f"Skipping vLLM training test due to hardware constraints: { e }  )
545545            elif  "KeyError"  in  str (e ) and  "RANK"  in  str (e ):
546-                 self . skipTest (f"Skipping vLLM training test due to environment setup issues: { e }  )
546+                 pytest . skip (f"Skipping vLLM training test due to environment setup issues: { e }  )
547547            elif  "ValueError"  in  str (e ) and  "memory"  in  str (e ).lower ():
548-                 self . skipTest (f"Skipping vLLM training test due to memory constraints: { e }  )
548+                 pytest . skip (f"Skipping vLLM training test due to memory constraints: { e }  )
549549            else :
550550                raise 
551551
0 commit comments