use of io.seldon.protos.DeploymentProtos.Parameter in project seldon-core by SeldonIO.
the class SeldonDeploymentOperatorImpl method extractPredictiveUnitParametersAsJson.
private String extractPredictiveUnitParametersAsJson(PredictiveUnit predictiveUnit) {
if (predictiveUnit == null)
return "";
StringJoiner sj = new StringJoiner(",", "[", "]");
List<Parameter> parameters = predictiveUnit.getParametersList();
for (Parameter parameter : parameters) {
try {
String j = ProtoBufUtils.toJson(parameter, true, false);
sj.add(j);
} catch (InvalidProtocolBufferException e) {
throw new RuntimeException(e);
}
}
return sj.toString();
}
Aggregations