Skip to content

Commit

Permalink
fix Bug: KeyError: 'text'
Browse files Browse the repository at this point in the history
File data_juice/config/config.py lines 418-429 did not consider the situation when arg: text_key was initialized to 'text', resulting in arg: text_key not being updated properly and always being initialized to the value of 'text'
  • Loading branch information
shiweijiezero authored Apr 17, 2024
1 parent c1a8aa8 commit 094440b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data_juicer/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ def init_setup_from_cfg(cfg):
args['image_key'] = cfg.image_key
args['audio_key'] = cfg.audio_key
args['video_key'] = cfg.video_key
if text_key:
args['text_key'] = text_key
args['image_key'] = cfg.image_key
args['audio_key'] = cfg.audio_key
args['video_key'] = cfg.video_key
op[op_name] = args

return cfg
Expand Down

0 comments on commit 094440b

Please sign in to comment.