Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove random selection fallback when signature def not found #88

Merged
merged 5 commits into from
Apr 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Removing random tag selector
  • Loading branch information
dyastremsky committed Feb 13, 2023
commit b09159f5733ed862f3dc30fb7f22a67e69f4905d
20 changes: 4 additions & 16 deletions mirror/tensorflow_backend_tf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -990,22 +990,10 @@ TRITONTF_ModelCreateFromSavedModel(
auto sig_itr =
bundle->meta_graph_def.signature_def().find(SIGNATURE_DEF_KEY_TO_USE);
if (sig_itr == bundle->meta_graph_def.signature_def().end()) {
// If default serving signature_def key is not found, maybe it is named
// something else, use one that is neither init_op key nor train_op key
for (sig_itr = bundle->meta_graph_def.signature_def().begin();
sig_itr != bundle->meta_graph_def.signature_def().end(); sig_itr++) {
if ((sig_itr->first != INIT_OP_SIGNATURE_DEF_KEY) &&
(sig_itr->first != TRAIN_OP_SIGNATURE_DEF_KEY)) {
LOG(WARNING) << "unable to find serving signature '"
<< SIGNATURE_DEF_KEY_TO_USE;
LOG(WARNING) << "using signature '" << sig_itr->first << "'";
break;
}
}
if (sig_itr == bundle->meta_graph_def.signature_def().end()) {
return TRITONTF_ErrorNew(
"unable to load model '" + std::string(model_name) + "', expected '" +
SIGNATURE_DEF_KEY_TO_USE + "' signature");
// If serving signature_def key is not found, return error.
return TRITONTF_ErrorNew(
"unable to load model '" + std::string(model_name) + "', expected '" +
SIGNATURE_DEF_KEY_TO_USE + "' signature");
}
}

Expand Down