Skip to content

Commit

Permalink
* bug fixed: unmatched OP name list and actual OP list after skipping…
Browse files Browse the repository at this point in the history
… some OPs whose dependencies are not installed
  • Loading branch information
HYLcool committed Nov 30, 2023
1 parent c5465de commit d0924ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data_juicer/ops/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ def load_ops(process_list, op_fusion=False):
:return: The op instance list.
"""
ops = []
new_process_list = []
for process in process_list:
op_name, args = list(process.items())[0]
if op_name in UNAVAILABLE_OPERATORS:
logger.warning(UNAVAILABLE_OPERATORS[op_name].get_warning_msg())
continue
ops.append(OPERATORS.modules[op_name](**args))
new_process_list.append(process)

# detect filter groups
if op_fusion:
process_list, ops = fuse_operators(process_list, ops)
new_process_list, ops = fuse_operators(new_process_list, ops)

return process_list, ops
return new_process_list, ops

0 comments on commit d0924ee

Please sign in to comment.