Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/changelog/119543.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pr: 119543
summary: "[Inference API] Fix unique ID message for inference ID matches trained model\
\ ID"
area: Machine Learning
type: bug
issues:
- 111312
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ public final class Messages {
public static final String FIELD_CANNOT_BE_NULL = "Field [{0}] cannot be null";
public static final String MODEL_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT =
"Model IDs must be unique. Requested model ID [{}] matches existing model IDs but must not.";
public static final String INFERENCE_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT =
"Inference endpoint IDs must be unique. Requested inference endpoint ID [{}] matches existing trained model ID(s) but must not.";
public static final String MODEL_ID_DOES_NOT_MATCH_EXISTING_MODEL_IDS_BUT_MUST_FOR_IN_CLUSTER_SERVICE =
"Requested model ID [{}] does not have a matching trained model and thus cannot be updated.";
public static final String INFERENCE_ENTITY_NON_EXISTANT_NO_UPDATE = "The inference endpoint [{}] does not exist and cannot be updated";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected void masterOperation(
if ((assignments == null || assignments.isEmpty()) == false) {
listener.onFailure(
ExceptionsHelper.badRequestException(
Messages.MODEL_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT,
Messages.INFERENCE_ID_MATCHES_EXISTING_MODEL_IDS_BUT_MUST_NOT,
request.getInferenceEntityId()
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ public void testPutInferenceModelFailsWhenTrainedModelWithIdAlreadyExists() thro
assertThat(
e.getMessage(),
Matchers.containsString(
"Model IDs must be unique. Requested model ID [" + modelId + "] matches existing model IDs but must not."
"Inference endpoint IDs must be unique. Requested inference endpoint ID ["
+ modelId
+ "] matches existing trained model ID(s) but must not."
)

);
}

Expand Down
Loading