Skip to content

Commit 492fcfb

Browse files
authored
Skipping empty tagger key instead of erroring out (#262)
1 parent c93fd26 commit 492fcfb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/dolma/core/runtime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ def _write_sample_to_streams(
212212
attributes_by_stream[tagger_output.path] = {}
213213

214214
for tagger_key, tagger_value in tagger_data.items():
215-
tagger_key = f"{tagger_output.exp}__{tagger_output.name}__{make_variable_name(tagger_key)}"
216-
attributes_by_stream[tagger_output.path][tagger_key] = tagger_value
215+
if tagger_key:
216+
tagger_key = f"{tagger_output.exp}__{tagger_output.name}__{make_variable_name(tagger_key)}"
217+
attributes_by_stream[tagger_output.path][tagger_key] = tagger_value
217218

218219
for stream_path, attributes in attributes_by_stream.items():
219220
# actually write

0 commit comments

Comments
 (0)