Ver Fonte

Print warning on checkpoint not found

Eric Wang há 3 anos atrás
pai
commit
683810b4a1
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      finetune.py

+ 2 - 0
finetune.py

@@ -155,6 +155,8 @@ def train(
             print(f"Restarting from {checkpoint_name}")
             adapters_weights = torch.load(checkpoint_name)
             model = set_peft_model_state_dict(model, adapters_weights)
+        else:
+            print(f"Checkpoint {checkpoint_name} not found")
 
     model.print_trainable_parameters()  # Be more transparent about the % of trainable params.