Skip to content

Commit 571c5dc

Browse files
authored
Allow missing ensemble output(s) (#399)
1 parent 84868f1 commit 571c5dc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ensemble_scheduler/ensemble_scheduler.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,11 +1200,6 @@ EnsembleContext::CheckAndSetEnsembleOutput(
12001200
ready = false;
12011201
break;
12021202
}
1203-
// check if the output is provided
1204-
else if (tensor[iteration_count].data_ == nullptr) {
1205-
ready = false;
1206-
break;
1207-
}
12081203
}
12091204
}
12101205
if (!ready) {
@@ -1224,6 +1219,12 @@ EnsembleContext::CheckAndSetEnsembleOutput(
12241219
auto& tensor_data = tensor_data_[output_pair.first];
12251220
auto& tensor = tensor_data.tensor_[iteration_count];
12261221

1222+
if (tensor.data_ == nullptr) {
1223+
LOG_VERBOSE(1) << "Composing models did not output tensor "
1224+
<< output_pair.first;
1225+
continue;
1226+
}
1227+
12271228
auto shape = ReshapeTensorDims(
12281229
output_pair.second, (lrequest->BatchSize() != 0),
12291230
tensor_data.batch_size_, tensor.data_->OriginalShape());

0 commit comments

Comments
 (0)