Skip to content

Commit 692f79a

Browse files
cant throw error for mixed tasks yet
1 parent df7325f commit 692f79a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/fairseq2/datasets/prompt.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,13 @@ def process_examples(example: dict[str, Any]) -> dict[str, Any]:
250250
jsonl_content = {}
251251
for k in jsonl_keys:
252252
if k not in example:
253-
raise KeyError(
254-
f"Required key '{k}' not found in example dictionary."
255-
)
256-
jsonl_content[k] = example[k]
253+
print(f"Required key '{k}' not found in example dictionary.")
254+
# raise KeyError(
255+
# f"Required key '{k}' not found in example dictionary."
256+
# )
257+
jsonl_content[k] = None
258+
else:
259+
jsonl_content[k] = example[k]
257260
else:
258261
jsonl_content = None
259262

0 commit comments

Comments
 (0)