sagemaker-hyperpod 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sagemaker/__init__.py +0 -0
- sagemaker/hyperpod/__init__.py +2 -0
- sagemaker/hyperpod/cli/__init__.py +0 -0
- sagemaker/hyperpod/cli/clients/__init__.py +12 -0
- sagemaker/hyperpod/cli/clients/kubernetes_client.py +365 -0
- sagemaker/hyperpod/cli/commands/__init__.py +0 -0
- sagemaker/hyperpod/cli/commands/cluster.py +627 -0
- sagemaker/hyperpod/cli/commands/inference.py +659 -0
- sagemaker/hyperpod/cli/commands/training.py +347 -0
- sagemaker/hyperpod/cli/constants/__init__.py +0 -0
- sagemaker/hyperpod/cli/constants/command_constants.py +105 -0
- sagemaker/hyperpod/cli/constants/exception_constants.py +13 -0
- sagemaker/hyperpod/cli/constants/hyperpod_instance_types.py +100 -0
- sagemaker/hyperpod/cli/constants/kueue_constants.py +17 -0
- sagemaker/hyperpod/cli/constants/pytorch_constants.py +15 -0
- sagemaker/hyperpod/cli/hyp_cli.py +132 -0
- sagemaker/hyperpod/cli/inference_utils.py +121 -0
- sagemaker/hyperpod/cli/service/__init__.py +12 -0
- sagemaker/hyperpod/cli/service/cancel_training_job.py +70 -0
- sagemaker/hyperpod/cli/service/discover_namespaces.py +108 -0
- sagemaker/hyperpod/cli/service/exec_command.py +75 -0
- sagemaker/hyperpod/cli/service/get_logs.py +136 -0
- sagemaker/hyperpod/cli/service/get_namespaces.py +59 -0
- sagemaker/hyperpod/cli/service/get_training_job.py +110 -0
- sagemaker/hyperpod/cli/service/list_pods.py +138 -0
- sagemaker/hyperpod/cli/service/list_training_jobs.py +178 -0
- sagemaker/hyperpod/cli/service/self_subject_access_review.py +47 -0
- sagemaker/hyperpod/cli/telemetry/__init__.py +12 -0
- sagemaker/hyperpod/cli/telemetry/user_agent.py +36 -0
- sagemaker/hyperpod/cli/templates/__init__.py +12 -0
- sagemaker/hyperpod/cli/templates/k8s_pytorch_job_template.py +74 -0
- sagemaker/hyperpod/cli/training_utils.py +200 -0
- sagemaker/hyperpod/cli/utils.py +183 -0
- sagemaker/hyperpod/cli/validators/__init__.py +12 -0
- sagemaker/hyperpod/cli/validators/cluster_validator.py +52 -0
- sagemaker/hyperpod/cli/validators/job_validator.py +346 -0
- sagemaker/hyperpod/cli/validators/validator.py +75 -0
- sagemaker/hyperpod/common/__init__.py +0 -0
- sagemaker/hyperpod/common/config/__init__.py +1 -0
- sagemaker/hyperpod/common/config/metadata.py +18 -0
- sagemaker/hyperpod/common/utils.py +299 -0
- sagemaker/hyperpod/inference/__init__.py +11 -0
- sagemaker/hyperpod/inference/config/__init__.py +0 -0
- sagemaker/hyperpod/inference/config/constants.py +18 -0
- sagemaker/hyperpod/inference/config/hp_endpoint_config.py +767 -0
- sagemaker/hyperpod/inference/config/hp_jumpstart_endpoint_config.py +572 -0
- sagemaker/hyperpod/inference/hp_endpoint.py +203 -0
- sagemaker/hyperpod/inference/hp_endpoint_base.py +223 -0
- sagemaker/hyperpod/inference/hp_jumpstart_endpoint.py +232 -0
- sagemaker/hyperpod/observability/MonitoringConfig.py +10 -0
- sagemaker/hyperpod/observability/__init__.py +0 -0
- sagemaker/hyperpod/observability/constants.py +2 -0
- sagemaker/hyperpod/observability/utils.py +64 -0
- sagemaker/hyperpod/training/__init__.py +9 -0
- sagemaker/hyperpod/training/config/__init__.py +1 -0
- sagemaker/hyperpod/training/config/hyperpod_pytorch_job_config.py +2977 -0
- sagemaker/hyperpod/training/config/hyperpod_pytorch_job_status.py +3083 -0
- sagemaker/hyperpod/training/hyperpod_pytorch_job.py +253 -0
- sagemaker_hyperpod-3.0.0.dist-info/METADATA +534 -0
- sagemaker_hyperpod-3.0.0.dist-info/RECORD +66 -0
- sagemaker_hyperpod-3.0.0.dist-info/WHEEL +5 -0
- sagemaker_hyperpod-3.0.0.dist-info/entry_points.txt +2 -0
- sagemaker_hyperpod-3.0.0.dist-info/licenses/LICENSE +175 -0
- sagemaker_hyperpod-3.0.0.dist-info/licenses/NOTICE +1 -0
- sagemaker_hyperpod-3.0.0.dist-info/top_level.txt +1 -0
- sagemaker_hyperpod-3.0.0.dist-info/zip-safe +1 -0
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
2
|
+
from typing import Optional, List, Dict, Union, Literal
|
|
3
|
+
from sagemaker.hyperpod.common.config import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Dimensions(BaseModel):
|
|
7
|
+
model_config = ConfigDict(extra="forbid")
|
|
8
|
+
|
|
9
|
+
name: str = Field(description="CloudWatch Metric dimension name")
|
|
10
|
+
value: str = Field(description="CloudWatch Metric dimension value")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CloudWatchTrigger(BaseModel):
|
|
14
|
+
"""CloudWatch metric trigger to use for autoscaling"""
|
|
15
|
+
|
|
16
|
+
model_config = ConfigDict(extra="forbid")
|
|
17
|
+
|
|
18
|
+
dimensions: Optional[List[Dimensions]] = Field(
|
|
19
|
+
default=None, description="Dimensions for Cloudwatch metrics"
|
|
20
|
+
)
|
|
21
|
+
metricCollectionPeriod: Optional[int] = Field(
|
|
22
|
+
default=300,
|
|
23
|
+
alias="metric_collection_period",
|
|
24
|
+
description="Defines the Period for CloudWatch query",
|
|
25
|
+
)
|
|
26
|
+
metricCollectionStartTime: Optional[int] = Field(
|
|
27
|
+
default=300,
|
|
28
|
+
alias="metric_collection_start_time",
|
|
29
|
+
description="Defines the StartTime for CloudWatch query",
|
|
30
|
+
)
|
|
31
|
+
metricName: Optional[str] = Field(
|
|
32
|
+
default=None,
|
|
33
|
+
alias="metric_name",
|
|
34
|
+
description="Metric name to query for Cloudwatch trigger",
|
|
35
|
+
)
|
|
36
|
+
metricStat: Optional[str] = Field(
|
|
37
|
+
default="Average",
|
|
38
|
+
alias="metric_stat",
|
|
39
|
+
description="Statistics metric to be used by Trigger. Used to define Stat for CloudWatch query. Default is Average.",
|
|
40
|
+
)
|
|
41
|
+
metricType: Optional[Literal["Value", "Average"]] = Field(
|
|
42
|
+
default="Average",
|
|
43
|
+
alias="metric_type",
|
|
44
|
+
description="The type of metric to be used by HPA. Enum: AverageValue - Uses average value of metric per pod, Value - Uses absolute metric value",
|
|
45
|
+
)
|
|
46
|
+
minValue: Optional[float] = Field(
|
|
47
|
+
default=0,
|
|
48
|
+
alias="min_value",
|
|
49
|
+
description="Minimum metric value used in case of empty response from CloudWatch. Default is 0.",
|
|
50
|
+
)
|
|
51
|
+
name: Optional[str] = Field(
|
|
52
|
+
default=None, description="Name for the CloudWatch trigger"
|
|
53
|
+
)
|
|
54
|
+
namespace: Optional[str] = Field(
|
|
55
|
+
default=None, description="AWS CloudWatch namespace for metric"
|
|
56
|
+
)
|
|
57
|
+
targetValue: Optional[float] = Field(
|
|
58
|
+
default=None,
|
|
59
|
+
alias="target_value",
|
|
60
|
+
description="TargetValue for CloudWatch metric",
|
|
61
|
+
)
|
|
62
|
+
useCachedMetrics: Optional[bool] = Field(
|
|
63
|
+
default=True,
|
|
64
|
+
alias="use_cached_metrics",
|
|
65
|
+
description="Enable caching of metric values during polling interval. Default is true",
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class PrometheusTrigger(BaseModel):
|
|
70
|
+
"""Prometheus metric trigger to use for autoscaling"""
|
|
71
|
+
|
|
72
|
+
model_config = ConfigDict(extra="forbid")
|
|
73
|
+
|
|
74
|
+
customHeaders: Optional[str] = Field(
|
|
75
|
+
default=None,
|
|
76
|
+
alias="custom_headers",
|
|
77
|
+
description="Custom headers to include while querying the prometheus endpoint.",
|
|
78
|
+
)
|
|
79
|
+
metricType: Optional[Literal["Value", "Average"]] = Field(
|
|
80
|
+
default="Average",
|
|
81
|
+
alias="metric_type",
|
|
82
|
+
description="The type of metric to be used by HPA. Enum: AverageValue - Uses average value of metric per pod, Value - Uses absolute metric value",
|
|
83
|
+
)
|
|
84
|
+
name: Optional[str] = Field(
|
|
85
|
+
default=None, description="Name for the Prometheus trigger"
|
|
86
|
+
)
|
|
87
|
+
namespace: Optional[str] = Field(
|
|
88
|
+
default=None, description="Namespace for namespaced queries"
|
|
89
|
+
)
|
|
90
|
+
query: Optional[str] = Field(
|
|
91
|
+
default=None, description="PromQLQuery for the metric."
|
|
92
|
+
)
|
|
93
|
+
serverAddress: Optional[str] = Field(
|
|
94
|
+
default=None,
|
|
95
|
+
alias="server_address",
|
|
96
|
+
description="Server address for AMP workspace",
|
|
97
|
+
)
|
|
98
|
+
targetValue: Optional[float] = Field(
|
|
99
|
+
default=None,
|
|
100
|
+
alias="target_value",
|
|
101
|
+
description="Target metric value for scaling",
|
|
102
|
+
)
|
|
103
|
+
useCachedMetrics: Optional[bool] = Field(
|
|
104
|
+
default=True,
|
|
105
|
+
alias="use_cached_metrics",
|
|
106
|
+
description="Enable caching of metric values during polling interval. Default is true",
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class AutoScalingSpec(BaseModel):
|
|
111
|
+
model_config = ConfigDict(extra="forbid")
|
|
112
|
+
|
|
113
|
+
cloudWatchTrigger: Optional[CloudWatchTrigger] = Field(
|
|
114
|
+
default=None,
|
|
115
|
+
alias="cloud_watch_trigger",
|
|
116
|
+
description="CloudWatch metric trigger to use for autoscaling",
|
|
117
|
+
)
|
|
118
|
+
cooldownPeriod: Optional[int] = Field(
|
|
119
|
+
default=300,
|
|
120
|
+
alias="cooldown_period",
|
|
121
|
+
description="The period to wait after the last trigger reported active before scaling the resource back to 0. Default 300 seconds.",
|
|
122
|
+
)
|
|
123
|
+
initialCooldownPeriod: Optional[int] = Field(
|
|
124
|
+
default=300,
|
|
125
|
+
alias="initial_cooldown_period",
|
|
126
|
+
description="The delay before the cooldownPeriod starts after the initial creation of the ScaledObject. Default 300 seconds.",
|
|
127
|
+
)
|
|
128
|
+
maxReplicaCount: Optional[int] = Field(
|
|
129
|
+
default=5,
|
|
130
|
+
alias="max_replica_count",
|
|
131
|
+
description="The maximum number of model pods to scale to. Default 5.",
|
|
132
|
+
)
|
|
133
|
+
minReplicaCount: Optional[int] = Field(
|
|
134
|
+
default=1,
|
|
135
|
+
alias="min_replica_count",
|
|
136
|
+
description="The minimum number of model pods to scale down to. Default 1.",
|
|
137
|
+
)
|
|
138
|
+
pollingInterval: Optional[int] = Field(
|
|
139
|
+
default=30,
|
|
140
|
+
alias="polling_interval",
|
|
141
|
+
description="This is the interval to check each trigger on. Default 30 seconds.",
|
|
142
|
+
)
|
|
143
|
+
prometheusTrigger: Optional[PrometheusTrigger] = Field(
|
|
144
|
+
default=None,
|
|
145
|
+
alias="prometheus_trigger",
|
|
146
|
+
description="Prometheus metric trigger to use for autoscaling",
|
|
147
|
+
)
|
|
148
|
+
scaleDownStabilizationTime: Optional[int] = Field(
|
|
149
|
+
default=300,
|
|
150
|
+
alias="scale_down_stabilization_time",
|
|
151
|
+
description="The time window to stabilize for HPA before scaling down. Default 300 seconds.",
|
|
152
|
+
)
|
|
153
|
+
scaleUpStabilizationTime: Optional[int] = Field(
|
|
154
|
+
default=0,
|
|
155
|
+
alias="scale_up_stabilization_time",
|
|
156
|
+
description="The time window to stabilize for HPA before scaling up. Default 0 seconds.",
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class EnvironmentVariables(BaseModel):
|
|
161
|
+
model_config = ConfigDict(extra="forbid")
|
|
162
|
+
|
|
163
|
+
name: str
|
|
164
|
+
value: str
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class ModelMetrics(BaseModel):
|
|
168
|
+
"""Configuration for model container metrics scraping"""
|
|
169
|
+
|
|
170
|
+
model_config = ConfigDict(extra="forbid")
|
|
171
|
+
|
|
172
|
+
path: Optional[str] = Field(
|
|
173
|
+
default="/metrics", description="Path where the model exposes metrics"
|
|
174
|
+
)
|
|
175
|
+
port: Optional[int] = Field(
|
|
176
|
+
default=8080,
|
|
177
|
+
description="Port where the model exposes metrics. If not specified, a default port will be used.",
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class Metrics(BaseModel):
|
|
182
|
+
"""Configuration for metrics collection and exposure"""
|
|
183
|
+
|
|
184
|
+
model_config = ConfigDict(extra="forbid")
|
|
185
|
+
|
|
186
|
+
enabled: Optional[bool] = Field(
|
|
187
|
+
default=False, description="Enable metrics collection for this model deployment"
|
|
188
|
+
)
|
|
189
|
+
metricsScrapeIntervalSeconds: Optional[int] = Field(
|
|
190
|
+
default=15,
|
|
191
|
+
alias="metrics_scrape_interval_seconds",
|
|
192
|
+
description="Scrape interval in seconds for metrics collection from sidecar and model container.",
|
|
193
|
+
)
|
|
194
|
+
modelMetrics: Optional[ModelMetrics] = Field(
|
|
195
|
+
default=None,
|
|
196
|
+
alias="model_metrics",
|
|
197
|
+
description="Configuration for model container metrics scraping",
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class AdditionalConfigs(BaseModel):
|
|
202
|
+
model_config = ConfigDict(extra="forbid")
|
|
203
|
+
|
|
204
|
+
name: str
|
|
205
|
+
value: str
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
class Model(BaseModel):
|
|
209
|
+
model_config = ConfigDict(extra="forbid")
|
|
210
|
+
|
|
211
|
+
acceptEula: bool = Field(
|
|
212
|
+
default=False,
|
|
213
|
+
alias="accept_eula",
|
|
214
|
+
description="For models that require a Model Access Config, specify True or False to indicate whether model terms of use have been accepted.",
|
|
215
|
+
)
|
|
216
|
+
additionalConfigs: Optional[List[AdditionalConfigs]] = Field(
|
|
217
|
+
default=None, alias="additional_configs"
|
|
218
|
+
)
|
|
219
|
+
gatedModelDownloadRole: Optional[str] = Field(
|
|
220
|
+
default=None,
|
|
221
|
+
alias="gated_model_download_role",
|
|
222
|
+
description="The Amazon Resource Name (ARN) of an IAM role that will be used to download gated model",
|
|
223
|
+
)
|
|
224
|
+
modelHubName: Optional[str] = Field(
|
|
225
|
+
default="SageMakerPublicHub",
|
|
226
|
+
alias="model_hub_name",
|
|
227
|
+
description="The name of the model hub content. Can be an ARN or a simple name.",
|
|
228
|
+
)
|
|
229
|
+
modelId: str = Field(
|
|
230
|
+
alias="model_id",
|
|
231
|
+
description="The unique identifier of the model within the specified hub (hubContentArn).",
|
|
232
|
+
)
|
|
233
|
+
modelVersion: Optional[str] = Field(
|
|
234
|
+
default=None,
|
|
235
|
+
alias="model_version",
|
|
236
|
+
description="The version of the model to deploy, in semantic versioning format (e.g., 1.0.0).",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class SageMakerEndpoint(BaseModel):
|
|
241
|
+
model_config = ConfigDict(extra="forbid")
|
|
242
|
+
|
|
243
|
+
name: Optional[str] = Field(
|
|
244
|
+
default="",
|
|
245
|
+
description="Name of sagemaker endpoint. Defaults to empty string which represents that Sagemaker endpoint will not be created.",
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class Server(BaseModel):
|
|
250
|
+
model_config = ConfigDict(extra="forbid")
|
|
251
|
+
|
|
252
|
+
executionRole: Optional[str] = Field(
|
|
253
|
+
default=None,
|
|
254
|
+
alias="execution_role",
|
|
255
|
+
description="The Amazon Resource Name (ARN) of an IAM role that will be used to deploy and manage the inference server",
|
|
256
|
+
)
|
|
257
|
+
instanceType: str = Field(
|
|
258
|
+
alias="instance_type",
|
|
259
|
+
description="The EC2 instance type to use for the inference server. Must be one of the supported types.",
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
class TlsConfig(BaseModel):
|
|
264
|
+
model_config = ConfigDict(extra="forbid")
|
|
265
|
+
|
|
266
|
+
tlsCertificateOutputS3Uri: Optional[str] = Field(
|
|
267
|
+
default=None, alias="tls_certificate_output_s3_uri"
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class _HPJumpStartEndpoint(BaseModel):
|
|
272
|
+
"""Config defines the desired state of JumpStartModel."""
|
|
273
|
+
|
|
274
|
+
model_config = ConfigDict(extra="ignore")
|
|
275
|
+
|
|
276
|
+
autoScalingSpec: Optional[AutoScalingSpec] = Field(
|
|
277
|
+
default=None, alias="auto_scaling_spec"
|
|
278
|
+
)
|
|
279
|
+
environmentVariables: Optional[List[EnvironmentVariables]] = Field(
|
|
280
|
+
default=None,
|
|
281
|
+
alias="environment_variables",
|
|
282
|
+
description="Additional environment variables to be passed to the inference server. Limited to 100 key-value pairs.",
|
|
283
|
+
)
|
|
284
|
+
maxDeployTimeInSeconds: Optional[int] = Field(
|
|
285
|
+
default=3600,
|
|
286
|
+
alias="max_deploy_time_in_seconds",
|
|
287
|
+
description="Maximum allowed time in seconds for the deployment to complete before timing out. Defaults to 1 hour (3600 seconds)",
|
|
288
|
+
)
|
|
289
|
+
metrics: Optional[Metrics] = Field(
|
|
290
|
+
default=None, description="Configuration for metrics collection and exposure"
|
|
291
|
+
)
|
|
292
|
+
model: Model
|
|
293
|
+
replicas: Optional[int] = Field(
|
|
294
|
+
default=1,
|
|
295
|
+
description="The desired number of inference server replicas. Default 1.",
|
|
296
|
+
)
|
|
297
|
+
sageMakerEndpoint: Optional[SageMakerEndpoint] = Field(
|
|
298
|
+
default=None, alias="sage_maker_endpoint"
|
|
299
|
+
)
|
|
300
|
+
server: Server
|
|
301
|
+
tlsConfig: Optional[TlsConfig] = Field(default=None, alias="tls_config")
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
class Conditions(BaseModel):
|
|
305
|
+
"""DeploymentCondition describes the state of a deployment at a certain point."""
|
|
306
|
+
|
|
307
|
+
model_config = ConfigDict(extra="forbid")
|
|
308
|
+
|
|
309
|
+
lastTransitionTime: Optional[str] = Field(
|
|
310
|
+
default=None,
|
|
311
|
+
alias="last_transition_time",
|
|
312
|
+
description="Last time the condition transitioned from one status to another.",
|
|
313
|
+
)
|
|
314
|
+
lastUpdateTime: Optional[str] = Field(
|
|
315
|
+
default=None,
|
|
316
|
+
alias="last_update_time",
|
|
317
|
+
description="The last time this condition was updated.",
|
|
318
|
+
)
|
|
319
|
+
message: Optional[str] = Field(
|
|
320
|
+
default=None,
|
|
321
|
+
description="A human readable message indicating details about the transition.",
|
|
322
|
+
)
|
|
323
|
+
reason: Optional[str] = Field(
|
|
324
|
+
default=None, description="The reason for the condition's last transition."
|
|
325
|
+
)
|
|
326
|
+
status: str = Field(
|
|
327
|
+
description="Status of the condition, one of True, False, Unknown."
|
|
328
|
+
)
|
|
329
|
+
type: str = Field(description="Type of deployment condition.")
|
|
330
|
+
observedGeneration: Optional[int] = Field(
|
|
331
|
+
default=None,
|
|
332
|
+
alias="observed_generation",
|
|
333
|
+
description="observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.",
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class Status(BaseModel):
|
|
338
|
+
"""Status of the Deployment Object"""
|
|
339
|
+
|
|
340
|
+
model_config = ConfigDict(extra="forbid")
|
|
341
|
+
|
|
342
|
+
availableReplicas: Optional[int] = Field(
|
|
343
|
+
default=None,
|
|
344
|
+
alias="available_replicas",
|
|
345
|
+
description="Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.",
|
|
346
|
+
)
|
|
347
|
+
collisionCount: Optional[int] = Field(
|
|
348
|
+
default=None,
|
|
349
|
+
alias="collision_count",
|
|
350
|
+
description="Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.",
|
|
351
|
+
)
|
|
352
|
+
conditions: Optional[List[Conditions]] = Field(
|
|
353
|
+
default=None,
|
|
354
|
+
description="Represents the latest available observations of a deployment's current state.",
|
|
355
|
+
)
|
|
356
|
+
observedGeneration: Optional[int] = Field(
|
|
357
|
+
default=None,
|
|
358
|
+
alias="observed_generation",
|
|
359
|
+
description="The generation observed by the deployment controller.",
|
|
360
|
+
)
|
|
361
|
+
readyReplicas: Optional[int] = Field(
|
|
362
|
+
default=None,
|
|
363
|
+
alias="ready_replicas",
|
|
364
|
+
description="readyReplicas is the number of pods targeted by this Deployment with a Ready Condition.",
|
|
365
|
+
)
|
|
366
|
+
replicas: Optional[int] = Field(
|
|
367
|
+
default=None,
|
|
368
|
+
description="Total number of non-terminated pods targeted by this deployment (their labels match the selector).",
|
|
369
|
+
)
|
|
370
|
+
unavailableReplicas: Optional[int] = Field(
|
|
371
|
+
default=None,
|
|
372
|
+
alias="unavailable_replicas",
|
|
373
|
+
description="Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.",
|
|
374
|
+
)
|
|
375
|
+
updatedReplicas: Optional[int] = Field(
|
|
376
|
+
default=None,
|
|
377
|
+
alias="updated_replicas",
|
|
378
|
+
description="Total number of non-terminated pods targeted by this deployment that have the desired template spec.",
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class DeploymentStatus(BaseModel):
|
|
383
|
+
"""Details of the native kubernetes deployment that hosts the model"""
|
|
384
|
+
|
|
385
|
+
model_config = ConfigDict(extra="forbid")
|
|
386
|
+
|
|
387
|
+
deploymentObjectOverallState: Optional[str] = Field(
|
|
388
|
+
default=None,
|
|
389
|
+
alias="deployment_object_overall_state",
|
|
390
|
+
description="Overall State of the Deployment Object",
|
|
391
|
+
)
|
|
392
|
+
lastUpdated: str = Field(alias="last_updated", description="Last Update Time")
|
|
393
|
+
message: Optional[str] = Field(
|
|
394
|
+
default=None,
|
|
395
|
+
description="Message populated in the root CRD while updating the status of underlying Deployment",
|
|
396
|
+
)
|
|
397
|
+
name: str = Field(description="Name of the Deployment Object")
|
|
398
|
+
reason: Optional[str] = Field(
|
|
399
|
+
default=None,
|
|
400
|
+
description="Reason populated in the root CRD while updating the status of underlying Deployment",
|
|
401
|
+
)
|
|
402
|
+
status: Optional[Status] = Field(
|
|
403
|
+
default=None, description="Status of the Deployment Object"
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
class Sagemaker(BaseModel):
|
|
408
|
+
"""Status of the SageMaker endpoint"""
|
|
409
|
+
|
|
410
|
+
model_config = ConfigDict(extra="forbid")
|
|
411
|
+
|
|
412
|
+
configArn: Optional[str] = Field(
|
|
413
|
+
default=None,
|
|
414
|
+
alias="config_arn",
|
|
415
|
+
description="The Amazon Resource Name (ARN) of the endpoint configuration.",
|
|
416
|
+
)
|
|
417
|
+
endpointArn: Optional[str] = Field(
|
|
418
|
+
default=None,
|
|
419
|
+
alias="endpoint_arn",
|
|
420
|
+
description="The Amazon Resource Name (ARN) of the SageMaker endpoint",
|
|
421
|
+
)
|
|
422
|
+
modelArn: Optional[str] = Field(
|
|
423
|
+
default=None,
|
|
424
|
+
alias="model_arn",
|
|
425
|
+
description="The ARN of the model created in SageMaker.",
|
|
426
|
+
)
|
|
427
|
+
state: str = Field(description="The current state of the SageMaker endpoint")
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
class Endpoints(BaseModel):
|
|
431
|
+
"""EndpointStatus contains the status of SageMaker endpoints"""
|
|
432
|
+
|
|
433
|
+
model_config = ConfigDict(extra="forbid")
|
|
434
|
+
|
|
435
|
+
sagemaker: Optional[Sagemaker] = Field(
|
|
436
|
+
default=None, description="Status of the SageMaker endpoint"
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
class ModelMetrics(BaseModel):
|
|
441
|
+
"""Status of model container metrics collection"""
|
|
442
|
+
|
|
443
|
+
model_config = ConfigDict(extra="forbid")
|
|
444
|
+
|
|
445
|
+
path: Optional[str] = Field(
|
|
446
|
+
default=None, description="The path where metrics are available"
|
|
447
|
+
)
|
|
448
|
+
port: Optional[int] = Field(
|
|
449
|
+
default=None, description="The port on which metrics are exposed"
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
class MetricsStatus(BaseModel):
|
|
454
|
+
"""Status of metrics collection"""
|
|
455
|
+
|
|
456
|
+
model_config = ConfigDict(extra="forbid")
|
|
457
|
+
|
|
458
|
+
enabled: bool = Field(description="Whether metrics collection is enabled")
|
|
459
|
+
errorMessage: Optional[str] = Field(
|
|
460
|
+
default=None,
|
|
461
|
+
alias="error_message",
|
|
462
|
+
description="Error message if metrics collection is in error state",
|
|
463
|
+
)
|
|
464
|
+
metricsScrapeIntervalSeconds: Optional[int] = Field(
|
|
465
|
+
default=None,
|
|
466
|
+
alias="metrics_scrape_interval_seconds",
|
|
467
|
+
description="Scrape interval in seconds for metrics collection from sidecar and model container.",
|
|
468
|
+
)
|
|
469
|
+
modelMetrics: Optional[ModelMetrics] = Field(
|
|
470
|
+
default=None,
|
|
471
|
+
alias="model_metrics",
|
|
472
|
+
description="Status of model container metrics collection",
|
|
473
|
+
)
|
|
474
|
+
state: Optional[str] = Field(
|
|
475
|
+
default=None, description="Current state of metrics collection"
|
|
476
|
+
)
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
class TlsCertificate(BaseModel):
|
|
480
|
+
"""CertificateStatus represents the status of TLS certificates"""
|
|
481
|
+
|
|
482
|
+
model_config = ConfigDict(extra="forbid")
|
|
483
|
+
|
|
484
|
+
certificateARN: Optional[str] = Field(
|
|
485
|
+
default=None,
|
|
486
|
+
alias="certificate_arn",
|
|
487
|
+
description="The Amazon Resource Name (ARN) of the ACM certificate",
|
|
488
|
+
)
|
|
489
|
+
certificateDomainNames: Optional[List[str]] = Field(
|
|
490
|
+
default=None,
|
|
491
|
+
alias="certificate_domain_names",
|
|
492
|
+
description="The certificate domain names that is attached to the certificate",
|
|
493
|
+
)
|
|
494
|
+
certificateName: Optional[str] = Field(
|
|
495
|
+
default=None,
|
|
496
|
+
alias="certificate_name",
|
|
497
|
+
description="The certificate name of cert manager",
|
|
498
|
+
)
|
|
499
|
+
importedCertificates: Optional[List[str]] = Field(
|
|
500
|
+
default=None,
|
|
501
|
+
alias="imported_certificates",
|
|
502
|
+
description="Used for tracking the imported certificates to ACM",
|
|
503
|
+
)
|
|
504
|
+
issuerName: Optional[str] = Field(
|
|
505
|
+
default=None, alias="issuer_name", description="The issuer name of cert manager"
|
|
506
|
+
)
|
|
507
|
+
lastCertExpiryTime: Optional[str] = Field(
|
|
508
|
+
default=None,
|
|
509
|
+
alias="last_cert_expiry_time",
|
|
510
|
+
description="The last certificate expiry time",
|
|
511
|
+
)
|
|
512
|
+
tlsCertificateOutputS3Bucket: Optional[str] = Field(
|
|
513
|
+
default=None,
|
|
514
|
+
alias="tls_certificate_output_s3_bucket",
|
|
515
|
+
description="S3 bucket that stores the certificate that needs to be trusted",
|
|
516
|
+
)
|
|
517
|
+
tlsCertificateS3Keys: Optional[List[str]] = Field(
|
|
518
|
+
default=None,
|
|
519
|
+
alias="tls_certificate_s3_keys",
|
|
520
|
+
description="The output tls certificate S3 key that points to the .pem file",
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
class JumpStartModelStatus(BaseModel):
|
|
525
|
+
"""ModelDeploymentStatus defines the observed state of ModelDeployment"""
|
|
526
|
+
|
|
527
|
+
model_config = ConfigDict(extra="forbid")
|
|
528
|
+
|
|
529
|
+
conditions: Optional[List[Conditions]] = Field(
|
|
530
|
+
default=None,
|
|
531
|
+
description="Detailed conditions representing the state of the deployment",
|
|
532
|
+
)
|
|
533
|
+
deploymentStatus: Optional[DeploymentStatus] = Field(
|
|
534
|
+
default=None,
|
|
535
|
+
alias="deployment_status",
|
|
536
|
+
description="Details of the native kubernetes deployment that hosts the model",
|
|
537
|
+
)
|
|
538
|
+
endpoints: Optional[Endpoints] = Field(
|
|
539
|
+
default=None,
|
|
540
|
+
description="EndpointStatus contains the status of SageMaker endpoints",
|
|
541
|
+
)
|
|
542
|
+
metricsStatus: Optional[MetricsStatus] = Field(
|
|
543
|
+
default=None, alias="metrics_status", description="Status of metrics collection"
|
|
544
|
+
)
|
|
545
|
+
observedGeneration: Optional[int] = Field(
|
|
546
|
+
default=None,
|
|
547
|
+
alias="observed_generation",
|
|
548
|
+
description="Latest generation reconciled by controller",
|
|
549
|
+
)
|
|
550
|
+
replicas: Optional[int] = Field(
|
|
551
|
+
default=None, description="The observed number of inference server replicas."
|
|
552
|
+
)
|
|
553
|
+
selector: Optional[str] = Field(
|
|
554
|
+
default=None, description="LabelSelector for the deployment."
|
|
555
|
+
)
|
|
556
|
+
state: Optional[
|
|
557
|
+
Literal[
|
|
558
|
+
"DeploymentPending",
|
|
559
|
+
"DeploymentInProgress",
|
|
560
|
+
"DeploymentFailed",
|
|
561
|
+
"DeploymentComplete",
|
|
562
|
+
"DeletionPending",
|
|
563
|
+
"DeletionInProgress",
|
|
564
|
+
"DeletionFailed",
|
|
565
|
+
"DeletionComplete",
|
|
566
|
+
]
|
|
567
|
+
] = Field(default=None, description="Current phase of the model deployment")
|
|
568
|
+
tlsCertificate: Optional[TlsCertificate] = Field(
|
|
569
|
+
default=None,
|
|
570
|
+
alias="tls_certificate",
|
|
571
|
+
description="CertificateStatus represents the status of TLS certificates",
|
|
572
|
+
)
|