Skip to content

Commit

Permalink
set availablity checking from warning to error (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyzhang99 authored Apr 18, 2024
1 parent 33f72b1 commit 1d94a67
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
@@ -1,3 +1,5 @@
import sys

from loguru import logger

from data_juicer.utils.availability_utils import UNAVAILABLE_OPERATORS
Expand All @@ -21,8 +23,8 @@ def load_ops(process_list, op_fusion=False):
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
logger.error(UNAVAILABLE_OPERATORS[op_name].get_warning_msg())
sys.exit(UNAVAILABLE_OPERATORS[op_name].get_warning_msg())
ops.append(OPERATORS.modules[op_name](**args))
new_process_list.append(process)

Expand Down

0 comments on commit 1d94a67

Please sign in to comment.