Skip to content

Commit a71eee3

Browse files
Support Multimodal datasets
1 parent b93a673 commit a71eee3

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/together/utils/files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ def _check_message_content(
377377
return True, num_images
378378

379379
raise InvalidFileFormatError(
380-
message=f"Invalid content type on line {idx + 1} of the input file. Found {type(message_content)}",
380+
f"Invalid content type on line {idx + 1} of the input file. Expected string or multimodal list of dicts, "
381+
f"found {type(message_content)}",
381382
line_number=idx + 1,
382383
error_source="key_value",
383384
)

tests/unit/test_files_checks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import json
2-
import pytest
31
import csv
2+
import json
43
from pathlib import Path
54

6-
from together.constants import MIN_SAMPLES
7-
from together.utils.files import check_file, FilePurpose
5+
from together.utils.files import FilePurpose, check_file
86

97

108
def test_check_jsonl_valid_general(tmp_path: Path):

0 commit comments

Comments
 (0)