Ver Fonte

Add jsonl support (#212)

Handled by default with same "json" type, the lib auto detects the precise type.
Angainor Development há 3 anos atrás
pai
commit
c59d5672b0
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      finetune.py

+ 1 - 1
finetune.py

@@ -163,7 +163,7 @@ def train(
     )
     model = get_peft_model(model, config)
 
-    if data_path.endswith(".json"):  # todo: support jsonl
+    if data_path.endswith(".json") or data_path.endswith(".jsonl"):
         data = load_dataset("json", data_files=data_path)
     else:
         data = load_dataset(data_path)