Skip to content

Commit

Permalink
Allow missing ensemble output(s) (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
kthui authored Oct 16, 2024
1 parent 84868f1 commit 571c5dc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ensemble_scheduler/ensemble_scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1200,11 +1200,6 @@ EnsembleContext::CheckAndSetEnsembleOutput(
ready = false;
break;
}
// check if the output is provided
else if (tensor[iteration_count].data_ == nullptr) {
ready = false;
break;
}
}
}
if (!ready) {
Expand All @@ -1224,6 +1219,12 @@ EnsembleContext::CheckAndSetEnsembleOutput(
auto& tensor_data = tensor_data_[output_pair.first];
auto& tensor = tensor_data.tensor_[iteration_count];

if (tensor.data_ == nullptr) {
LOG_VERBOSE(1) << "Composing models did not output tensor "
<< output_pair.first;
continue;
}

auto shape = ReshapeTensorDims(
output_pair.second, (lrequest->BatchSize() != 0),
tensor_data.batch_size_, tensor.data_->OriginalShape());
Expand Down

0 comments on commit 571c5dc

Please sign in to comment.