fix: save train/test.jsonl to output_dir not parent
This commit is contained in:
1 parent
d5ba471b98
commit
7181acc580
1 file changed
+2
-2
@@ -62,11 +62,11 @@ def prepare_dataset(input_file, output_file, test_size=0.05):
|
||||
test_data = formatted[split_point:]
|
||||
|
||||
# Save
|
||||
with open(output_file.parent / "train.jsonl", "w") as f:
|
||||
with open(output_dir / "train.jsonl", "w") as f:
|
||||
for item in train_data:
|
||||
f.write(json.dumps(item) + "\n")
|
||||
|
||||
with open(output_file.parent / "test.jsonl", "w") as f:
|
||||
with open(output_dir / "test.jsonl", "w") as f:
|
||||
for item in test_data:
|
||||
f.write(json.dumps(item) + "\n")
|
||||
|
||||
|
||||
Reference in new issue
Block a user