Skip to content

Commit a8a2baf

Browse files
authored
Update inference config and integ tests (#167)
* Update inference config and integ tests * Update integ tests for new canaries
1 parent 95e073e commit a8a2baf

16 files changed

+36
-793
lines changed

src/sagemaker/hyperpod/inference/config/hp_endpoint_config.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from pydantic import BaseModel, ConfigDict, Field
22
from typing import Optional, List, Dict, Union, Literal
3-
from sagemaker.hyperpod.common.config import *
43

54

65
class Dimensions(BaseModel):
@@ -15,6 +14,11 @@ class CloudWatchTrigger(BaseModel):
1514

1615
model_config = ConfigDict(extra="forbid")
1716

17+
activationTargetValue: Optional[float] = Field(
18+
default=0,
19+
alias="activation_target_value",
20+
description="Activation Value for CloudWatch metric to scale from 0 to 1. Only applicable if minReplicaCount = 0",
21+
)
1822
dimensions: Optional[List[Dimensions]] = Field(
1923
default=None, description="Dimensions for Cloudwatch metrics"
2024
)
@@ -71,6 +75,11 @@ class PrometheusTrigger(BaseModel):
7175

7276
model_config = ConfigDict(extra="forbid")
7377

78+
activationTargetValue: Optional[float] = Field(
79+
default=0,
80+
alias="activation_target_value",
81+
description="Activation Value for Prometheus metric to scale from 0 to 1. Only applicable if minReplicaCount = 0",
82+
)
7483
customHeaders: Optional[str] = Field(
7584
default=None,
7685
alias="custom_headers",
@@ -177,7 +186,7 @@ class Metrics(BaseModel):
177186
model_config = ConfigDict(extra="forbid")
178187

179188
enabled: Optional[bool] = Field(
180-
default=False, description="Enable metrics collection for this model deployment"
189+
default=True, description="Enable metrics collection for this model deployment"
181190
)
182191
metricsScrapeIntervalSeconds: Optional[int] = Field(
183192
default=15,
@@ -459,7 +468,7 @@ class _HPEndpoint(BaseModel):
459468
endpointName: Optional[str] = Field(
460469
default=None,
461470
alias="endpoint_name",
462-
description="Name used for Sagemaker Endpoint Name of sagemaker endpoint. Defaults to empty string which represents that Sagemaker endpoint will not be created.",
471+
description="Name of a SageMaker endpoint to be created for this InferenceEndpointConfig. The default value of empty string, when used, will skip endpoint creation.",
463472
)
464473
instanceType: str = Field(
465474
alias="instance_type", description="Instance Type to deploy the model on"

src/sagemaker/hyperpod/inference/config/hp_jumpstart_endpoint_config.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from pydantic import BaseModel, ConfigDict, Field
2-
from typing import Optional, List, Dict, Union, Literal
3-
from sagemaker.hyperpod.common.config import *
2+
from typing import Optional, List, Literal
43

54

65
class Dimensions(BaseModel):
@@ -15,6 +14,11 @@ class CloudWatchTrigger(BaseModel):
1514

1615
model_config = ConfigDict(extra="forbid")
1716

17+
activationTargetValue: Optional[float] = Field(
18+
default=0,
19+
alias="activation_target_value",
20+
description="Activation Value for CloudWatch metric to scale from 0 to 1. Only applicable if minReplicaCount = 0",
21+
)
1822
dimensions: Optional[List[Dimensions]] = Field(
1923
default=None, description="Dimensions for Cloudwatch metrics"
2024
)
@@ -71,6 +75,11 @@ class PrometheusTrigger(BaseModel):
7175

7276
model_config = ConfigDict(extra="forbid")
7377

78+
activationTargetValue: Optional[float] = Field(
79+
default=0,
80+
alias="activation_target_value",
81+
description="Activation Value for Prometheus metric to scale from 0 to 1. Only applicable if minReplicaCount = 0",
82+
)
7483
customHeaders: Optional[str] = Field(
7584
default=None,
7685
alias="custom_headers",
@@ -184,7 +193,7 @@ class Metrics(BaseModel):
184193
model_config = ConfigDict(extra="forbid")
185194

186195
enabled: Optional[bool] = Field(
187-
default=False, description="Enable metrics collection for this model deployment"
196+
default=True, description="Enable metrics collection for this model deployment"
188197
)
189198
metricsScrapeIntervalSeconds: Optional[int] = Field(
190199
default=15,
@@ -242,7 +251,7 @@ class SageMakerEndpoint(BaseModel):
242251

243252
name: Optional[str] = Field(
244253
default="",
245-
description="Name of sagemaker endpoint. Defaults to empty string which represents that Sagemaker endpoint will not be created.",
254+
description="Name of a SageMaker endpoint to be created for this JumpStartModel. The default value of empty string, when used, will skip endpoint creation.",
246255
)
247256

248257

test/integration_tests/abstract_integration_tests.py

Lines changed: 0 additions & 271 deletions
This file was deleted.

0 commit comments

Comments
 (0)