Sebastian Gehrmann
commited on
Commit
·
8199c76
1
Parent(s):
ff40d8e
- schema_guided_dialog.py +5 -0
schema_guided_dialog.py
CHANGED
|
@@ -161,6 +161,11 @@ class SchemaGuidedDialog(datasets.GeneratorBasedBuilder):
|
|
| 161 |
else:
|
| 162 |
examples = json.load(open(filepath, encoding="utf-8"))[split]
|
| 163 |
for id_, example in enumerate(examples):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
yield id_, {
|
| 165 |
"gem_id": f"schema_guided_dialog-{split}-{id_}",
|
| 166 |
"gem_parent_id": f"schema_guided_dialog-{split}-{id_}",
|
|
|
|
| 161 |
else:
|
| 162 |
examples = json.load(open(filepath, encoding="utf-8"))[split]
|
| 163 |
for id_, example in enumerate(examples):
|
| 164 |
+
if not example["target"]:
|
| 165 |
+
print(example["prompt"])
|
| 166 |
+
print(example["da"])
|
| 167 |
+
print(example["prompt"])
|
| 168 |
+
example["target"] = "."
|
| 169 |
yield id_, {
|
| 170 |
"gem_id": f"schema_guided_dialog-{split}-{id_}",
|
| 171 |
"gem_parent_id": f"schema_guided_dialog-{split}-{id_}",
|