Explorar o código

Add jsonl support (#212)

Handled by default with same "json" type, the lib auto detects the precise type.
Angainor Development %!s(int64=3) %!d(string=hai) anos
pai
achega
c59d5672b0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)