Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: b4sjoo <[email protected]>
  • Loading branch information
b4sjoo committed Dec 18, 2024
1 parent 1db0678 commit 7fd2a60
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,11 @@ public void validateInputSchema(String modelId, MLInput mlInput) {
if (modelCacheHelper.getModelInterface(modelId) != null && modelCacheHelper.getModelInterface(modelId).get("input") != null) {
String inputSchemaString = modelCacheHelper.getModelInterface(modelId).get("input");
try {
String InputString = mlInput.toXContent(XContentFactory.jsonBuilder(), ToXContent.EMPTY_PARAMS).toString();
String inputString = mlInput.toXContent(XContentFactory.jsonBuilder(), ToXContent.EMPTY_PARAMS).toString();
log.warn(inputString + "wtf");
System.out.println(inputString + "wtf");
// Process the parameters field in the input dataset to convert it back to its original datatype, instead of a string
String processedInputString = MLNodeUtils.processRemoteInferenceInputDataSetParametersValue(InputString);
String processedInputString = MLNodeUtils.processRemoteInferenceInputDataSetParametersValue(inputString);
MLNodeUtils.validateSchema(inputSchemaString, processedInputString);
} catch (Exception e) {
throw new OpenSearchStatusException("Error validating input schema: " + e.getMessage(), RestStatus.BAD_REQUEST);
Expand Down

0 comments on commit 7fd2a60

Please sign in to comment.