File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
python/ray/data/_internal/issue_detection/detectors Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ class HangingExecutionIssueDetector(IssueDetector):
4545 def __init__ (
4646 self ,
4747 dataset_id : str ,
48- operators : Callable [[], List ["PhysicalOperator" ]],
48+ get_operators : Callable [[], List ["PhysicalOperator" ]],
4949 config : "HangingExecutionIssueDetectorConfig" ,
5050 ):
5151 self ._dataset_id = dataset_id
52- self ._get_operators = operators
52+ self ._get_operators = get_operators
5353 self ._detector_cfg = config
5454
5555 self ._op_task_stats_min_count = self ._detector_cfg .op_task_stats_min_count
@@ -77,12 +77,16 @@ def from_executor(
7777 Returns:
7878 An instance of HangingExecutionIssueDetector.
7979 """
80+
81+ def get_operators_fn () -> List ["PhysicalOperator" ]:
82+ if not executor ._topology :
83+ return []
84+ return list (executor ._topology .keys ())
85+
8086 ctx = executor ._data_context
8187 return cls (
8288 dataset_id = executor ._dataset_id ,
83- operators = lambda : list (executor ._topology .keys ())
84- if executor ._topology
85- else [],
89+ get_operators = get_operators_fn ,
8690 config = ctx .issue_detectors_config .hanging_detector_config ,
8791 )
8892
You can’t perform that action at this time.
0 commit comments