Skip to content

Commit 1f89243

Browse files
authored
Use the SetModelConfig backend utility (#71)
1 parent 3ecda56 commit 1f89243

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/libtorch.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,7 @@ ModelState::Create(TRITONBACKEND_Model* triton_model, ModelState** state)
159159
triton_model, &auto_complete_config));
160160
if (auto_complete_config) {
161161
RETURN_IF_ERROR((*state)->AutoCompleteConfig());
162-
163-
triton::common::TritonJson::WriteBuffer json_buffer;
164-
(*state)->ModelConfig().Write(&json_buffer);
165-
166-
TRITONSERVER_Message* message;
167-
RETURN_IF_ERROR(TRITONSERVER_MessageNewFromSerializedJson(
168-
&message, json_buffer.Base(), json_buffer.Size()));
169-
RETURN_IF_ERROR(TRITONBACKEND_ModelSetConfig(
170-
triton_model, 1 /* config_version */, message));
162+
RETURN_IF_ERROR((*state)->SetModelConfig());
171163
}
172164

173165
RETURN_IF_ERROR((*state)->ParseParameters());

0 commit comments

Comments
 (0)