Skip to content

Commit

Permalink
Remove unnecessary type in request parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
debermudez committed Sep 28, 2023
1 parent 107ccd5 commit 498a89e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/c++/library/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,13 @@ class InferenceServerClient {
InferStat infer_stat_;
};

enum RequestParameterType { STRING = 0, INT = 1, UINT = 2, BOOL = 3 };
enum RequestParameterType { STRING = 0, INT = 1, BOOL = 2 };
///
/// Structure to hold Request parameter data for Inference Request.
///
struct RequestParameter {
std::string str_value;
int64_t int_value;
uint64_t uint_value;
bool bool_value;
RequestParameterType type;
};
Expand Down
3 changes: 0 additions & 3 deletions src/c++/library/grpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,6 @@ InferenceServerGrpcClient::PreRunProcessing(
} else if (param.second.type == RequestParameterType::INT) {
(*infer_request_.mutable_parameters())[param.first].set_int64_param(
param.second.int_value);
} else if (param.second.type == RequestParameterType::UINT) {
(*infer_request_.mutable_parameters())[param.first].set_uint64_param(
param.second.uint_value);
} else if (param.second.type == RequestParameterType::BOOL) {
(*infer_request_.mutable_parameters())[param.first].set_bool_param(
param.second.bool_value);
Expand Down
3 changes: 1 addition & 2 deletions src/c++/perf_analyzer/client_backend/client_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,13 @@ struct ModelStatistics {
uint64_t cache_miss_time_ns_;
};

enum RequestParameterType { STRING = 0, INT = 1, UINT = 2, BOOL = 3 };
enum RequestParameterType { STRING = 0, INT = 1, BOOL = 2 };
///
/// Structure to hold Request parameter data for Inference Request.
///
struct RequestParameter {
std::string str_value;
int64_t int_value;
uint64_t uint_value;
bool bool_value;
RequestParameterType type;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ TritonClientBackend::ParseInferOptionsToTriton(
auto rp = tc::RequestParameter();
rp.str_value = map_entry.second.str_value;
rp.int_value = map_entry.second.int_value;
rp.uint_value = map_entry.second.uint_value;
rp.bool_value = map_entry.second.bool_value;
uint64_t val =
static_cast<std::underlying_type<cb::RequestParameterType>::type>(
Expand All @@ -604,8 +603,6 @@ TritonClientBackend::ParseInferOptionsToTriton(
triton_options->request_parameters.insert(
std::make_pair(map_entry.first, rp));
}
// triton_options->request_parameters.insert(rp)
// options.request_parameters.begin(), options.request_parameters.end());
}


Expand Down

0 comments on commit 498a89e

Please sign in to comment.