File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -322,14 +322,13 @@ def evaluate(
322322                    assert  len (completion_id ) ==  len (problems ), f"Missing problems in samples. Expected { len (problems )}   problems, got { len (completion_id )}  " 
323323
324324                    def  stucking_checker ():
325-                         while  remainings :
326-                             last_size  =  len (remainings )
327-                             time .sleep (240 )
328-                             if  last_size  !=  len (remainings ) or  len (remainings ) ==  0 :
329-                                 continue 
330-                             # Potential stucking 
331-                             warn ("No samples had finished testing in the last 240s" )
332-                             warn (f"{ len (remainings )}   samples to be tested: { remainings }  " )
325+                         not_done  =  futures 
326+                         while  len (not_done ) >  0 :
327+                             done , not_done  =  wait (not_done , timeout = 240 , return_when = FIRST_COMPLETED )
328+ 
329+                             if  len (done ) ==  0 :
330+                                 warn ("No samples have finished testing in the last 240s" )
331+                                 warn (f"{ len (remainings )}   samples to be tested: { remainings }  " )
333332
334333                    threading .Thread (target = stucking_checker ).start ()
335334
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments