Skip to content

Commit

Permalink
Do input validation only during model creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
afoucret committed Jul 2, 2024
1 parent f52ded4 commit 01a52b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public ActionRequestValidationException validateTrainedModelInput(
boolean forCreation,
ActionRequestValidationException validationException
) {
if (input != null && input.getFieldNames().isEmpty() == false) {
if (forCreation && input != null && input.getFieldNames().isEmpty() == false) {
return addValidationError("cannot specify [input.field_names] for a model of type [learning_to_rank]", validationException);
}

Expand Down

0 comments on commit 01a52b0

Please sign in to comment.