File tree Expand file tree Collapse file tree 2 files changed +0
-4
lines changed Expand file tree Collapse file tree 2 files changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -343,11 +343,9 @@ def _merge_sharded_checkpoints(
343343    for  file_name  in  files_to_load :
344344        part_file_path  =  os .path .join (sharded_ckpt_cached_folder , file_name )
345345        if  dduf_entries :
346-             # If dduf_entries is provided, check if part_file_path is in it 
347346            if  part_file_path  not  in dduf_entries :
348347                raise  FileNotFoundError (f"Part file { file_name }  )
349348        else :
350-             # If dduf_entries is not provided, check if the file exists on disk 
351349            if  not  os .path .exists (part_file_path ):
352350                raise  FileNotFoundError (f"Part file { file_name }  )
353351
Original file line number Diff line number Diff line change @@ -450,11 +450,9 @@ def _get_checkpoint_shard_files(
450450    index (downloaded and cached if `pretrained_model_name_or_path` is a model ID on the Hub). 
451451    """ 
452452    if  dduf_entries :
453-             # If dduf_entries is provided, check if part_file_path is in it 
454453        if  index_filename  not  in dduf_entries :
455454            raise  ValueError (f"Can't find a checkpoint index ({ index_filename } { pretrained_model_name_or_path }  )
456455    else :
457-         # If dduf_entries is not provided, check if the file exists on disk 
458456        if  not  os .path .isfile (index_filename ):
459457            raise  ValueError (f"Can't find a checkpoint index ({ index_filename } { pretrained_model_name_or_path }  )
460458
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments