@@ -26,13 +26,13 @@ public abstract class InferenceOperator<InferenceResult extends InferenceService
26
26
private final String inferenceId ;
27
27
private final BlockFactory blockFactory ;
28
28
29
- private final BulkInferenceExecutor < InferenceResult , Page > bulkInferenceExecutor ;
29
+ private final BulkInferenceExecutor bulkInferenceExecutor ;
30
30
31
31
@ SuppressWarnings ("this-escape" )
32
32
public InferenceOperator (DriverContext driverContext , InferenceRunner inferenceRunner , ThreadPool threadPool , String inferenceId ) {
33
33
super (driverContext , threadPool .getThreadContext (), MAX_INFERENCE_WORKER );
34
34
this .blockFactory = driverContext .blockFactory ();
35
- this .bulkInferenceExecutor = new BulkInferenceExecutor <> (inferenceRunner , threadPool , bulkExecutionConfig ());
35
+ this .bulkInferenceExecutor = new BulkInferenceExecutor (inferenceRunner , threadPool , bulkExecutionConfig ());
36
36
this .inferenceId = inferenceId ;
37
37
}
38
38
@@ -75,5 +75,13 @@ protected BulkInferenceExecutionConfig bulkExecutionConfig() {
75
75
76
76
protected abstract BulkInferenceRequestIterator requests (Page input );
77
77
78
- protected abstract BulkInferenceOutputBuilder <InferenceResult , Page > outputBuilder (Page input );
78
+ protected abstract OutputBuilder <InferenceResult > outputBuilder (Page input );
79
+
80
+ public abstract static class OutputBuilder <InferenceResult extends InferenceServiceResults > extends BulkInferenceOutputBuilder <
81
+ InferenceResult ,
82
+ Page > {
83
+ protected void releasePageOnAnyThread (Page page ) {
84
+ InferenceOperator .releasePageOnAnyThread (page );
85
+ }
86
+ }
79
87
}
0 commit comments