sagemaker-hyperpod 3.2.1__tar.gz → 3.2.2__tar.gz

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.
Files changed (89) hide show
  1. {sagemaker_hyperpod-3.2.1/src/sagemaker_hyperpod.egg-info → sagemaker_hyperpod-3.2.2}/PKG-INFO +220 -50
  2. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/README.md +219 -49
  3. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/pyproject.toml +1 -1
  4. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/setup.py +1 -1
  5. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_endpoint.py +4 -1
  6. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_endpoint_base.py +2 -1
  7. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_jumpstart_endpoint.py +4 -1
  8. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2/src/sagemaker_hyperpod.egg-info}/PKG-INFO +220 -50
  9. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/LICENSE +0 -0
  10. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/NOTICE +0 -0
  11. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/setup.cfg +0 -0
  12. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/__init__.py +0 -0
  13. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/__init__.py +0 -0
  14. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/__init__.py +0 -0
  15. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/clients/__init__.py +0 -0
  16. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/clients/kubernetes_client.py +0 -0
  17. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/__init__.py +0 -0
  18. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/cluster.py +0 -0
  19. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/cluster_stack.py +0 -0
  20. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/inference.py +0 -0
  21. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/init.py +0 -0
  22. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/training.py +0 -0
  23. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/common_utils.py +0 -0
  24. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/__init__.py +0 -0
  25. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/command_constants.py +0 -0
  26. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/exception_constants.py +0 -0
  27. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/hyperpod_instance_types.py +0 -0
  28. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/init_constants.py +0 -0
  29. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/kueue_constants.py +0 -0
  30. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/pytorch_constants.py +0 -0
  31. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/hyp_cli.py +0 -0
  32. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/inference_utils.py +0 -0
  33. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/init_utils.py +0 -0
  34. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/__init__.py +0 -0
  35. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/cancel_training_job.py +0 -0
  36. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/discover_namespaces.py +0 -0
  37. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/exec_command.py +0 -0
  38. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_logs.py +0 -0
  39. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_namespaces.py +0 -0
  40. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_training_job.py +0 -0
  41. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/list_pods.py +0 -0
  42. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/list_training_jobs.py +0 -0
  43. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/self_subject_access_review.py +0 -0
  44. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/__init__.py +0 -0
  45. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/cfn_cluster_creation.py +0 -0
  46. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_custom_endpoint_template.py +0 -0
  47. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_js_endpoint_template.py +0 -0
  48. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_pytorch_job_template.py +0 -0
  49. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/training_utils.py +0 -0
  50. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/utils.py +0 -0
  51. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/__init__.py +0 -0
  52. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/cluster_validator.py +0 -0
  53. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/job_validator.py +0 -0
  54. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/validator.py +0 -0
  55. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/__init__.py +0 -0
  56. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/config/__init__.py +0 -0
  57. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/config/hp_cluster_stack_config.py +0 -0
  58. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/hp_cluster_stack.py +0 -0
  59. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/__init__.py +0 -0
  60. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/cli_decorators.py +0 -0
  61. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/config/__init__.py +0 -0
  62. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/config/metadata.py +0 -0
  63. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/exceptions/__init__.py +0 -0
  64. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/__init__.py +0 -0
  65. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/constants.py +0 -0
  66. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/telemetry_logging.py +0 -0
  67. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/user_agent.py +0 -0
  68. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/utils.py +0 -0
  69. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/__init__.py +0 -0
  70. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/__init__.py +0 -0
  71. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/constants.py +0 -0
  72. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/hp_endpoint_config.py +0 -0
  73. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/hp_jumpstart_endpoint_config.py +0 -0
  74. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/jumpstart_public_hub_visualization_utils.py +0 -0
  75. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/MonitoringConfig.py +0 -0
  76. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/__init__.py +0 -0
  77. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/constants.py +0 -0
  78. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/utils.py +0 -0
  79. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/__init__.py +0 -0
  80. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/config/__init__.py +0 -0
  81. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/config/hyperpod_pytorch_job_unified_config.py +0 -0
  82. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/hyperpod_pytorch_job.py +0 -0
  83. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/quota_allocation_util.py +0 -0
  84. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/SOURCES.txt +0 -0
  85. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/dependency_links.txt +0 -0
  86. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/entry_points.txt +0 -0
  87. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/requires.txt +0 -0
  88. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/top_level.txt +0 -0
  89. {sagemaker_hyperpod-3.2.1 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sagemaker-hyperpod
3
- Version: 3.2.1
3
+ Version: 3.2.2
4
4
  Summary: Amazon SageMaker HyperPod SDK and CLI
5
5
  Home-page: https://github.com/aws/sagemaker-hyperpod-cli
6
6
  Author: Amazon Web Services
@@ -74,24 +74,33 @@ Note: Old `hyperpod`CLI V2 has been moved to `release_v2` branch. Please refer [
74
74
  - [Getting Cluster Context](#getting-cluster-context)
75
75
  - [Listing Pods](#listing-pods)
76
76
  - [Accessing Logs](#accessing-logs)
77
- - [CLI](#cli-)
78
- - [Training](#training-)
79
- - [Inference](#inference-)
80
- - [SDK](#sdk-)
77
+ - [CLI](#cli)
78
+ - [Cluster Management](#cluster-management)
79
+ - [Training](#training)
80
+ - [Inference](#inference)
81
+ - [SDK](#sdk)
82
+ - [Cluster Management](#cluster-management-sdk)
81
83
  - [Training](#training-sdk)
82
84
  - [Inference](#inference-sdk)
85
+ - [Examples](#examples)
83
86
 
84
87
 
85
88
  ## Overview
86
89
 
87
90
  The SageMaker HyperPod CLI is a tool that helps create training jobs and inference endpoint deployments to the Amazon SageMaker HyperPod clusters orchestrated by Amazon EKS. It provides a set of commands for managing the full lifecycle of jobs, including create, describe, list, and delete operations, as well as accessing pod and operator logs where applicable. The CLI is designed to abstract away the complexity of working directly with Kubernetes for these core actions of managing jobs on SageMaker HyperPod clusters orchestrated by Amazon EKS.
88
91
 
89
- ## Prerequisites for Training
92
+ ## Prerequisites
93
+
94
+ ### Region Configuration
95
+
96
+ **Important**: For commands that accept the `--region` option, if no region is explicitly provided, the command will use the default region from your AWS credentials configuration.
97
+
98
+ ### Prerequisites for Training
90
99
 
91
100
  - HyperPod CLI currently supports starting PyTorchJobs. To start a job, you need to install Training Operator first.
92
101
  - You can follow [pytorch operator doc](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-eks-operator-install.html) to install it.
93
102
 
94
- ## Prerequisites for Inference
103
+ ### Prerequisites for Inference
95
104
 
96
105
  - HyperPod CLI supports creating Inference Endpoints through jumpstart and through custom Endpoint config
97
106
  - You can follow [inference operator doc](https://github.com/aws/sagemaker-hyperpod-cli/tree/master/helm_chart/HyperPodHelmChart/charts/inference-operator) to install it.
@@ -111,13 +120,13 @@ SageMaker HyperPod CLI currently supports start training job with:
111
120
 
112
121
  2. Install the sagemaker-hyperpod-cli package.
113
122
 
114
- ```
123
+ ```bash
115
124
  pip install sagemaker-hyperpod
116
125
  ```
117
126
 
118
127
  3. Verify if the installation succeeded by running the following command.
119
128
 
120
- ```
129
+ ```bash
121
130
  hyp --help
122
131
  ```
123
132
 
@@ -130,10 +139,12 @@ The HyperPod CLI provides the following commands:
130
139
  - [Getting Cluster Context](#getting-cluster-context)
131
140
  - [Listing Pods](#listing-pods)
132
141
  - [Accessing Logs](#accessing-logs)
133
- - [CLI](#cli-)
134
- - [Training](#training-)
135
- - [Inference](#inference-)
136
- - [SDK](#sdk-)
142
+ - [CLI](#cli)
143
+ - [Cluster Management](#cluster-management)
144
+ - [Training](#training)
145
+ - [Inference](#inference)
146
+ - [SDK](#sdk)
147
+ - [Cluster Management](#cluster-management-sdk)
137
148
  - [Training](#training-sdk)
138
149
  - [Inference](#inference-sdk)
139
150
 
@@ -142,38 +153,49 @@ The HyperPod CLI provides the following commands:
142
153
 
143
154
  This command lists the available SageMaker HyperPod clusters and their capacity information.
144
155
 
145
- ```
146
- hyp list-cluster [--region <region>] [--namespace <namespace>] [--output <json|table>]
156
+ ```bash
157
+ hyp list-cluster
147
158
  ```
148
159
 
149
- * `region` (string) - Optional. The region that the SageMaker HyperPod and EKS clusters are located. If not specified, it will be set to the region from the current AWS account credentials.
150
- * `namespace` (string) - Optional. The namespace that users want to check the quota with. Only the SageMaker managed namespaces are supported.
151
- * `output` (enum) - Optional. The output format. Available values are `table` and `json`. The default value is `json`.
160
+ | Option | Type | Description |
161
+ |--------|------|-------------|
162
+ | `--region <region>` | Optional | The region that the SageMaker HyperPod and EKS clusters are located. If not specified, it will be set to the region from the current AWS account credentials. |
163
+ | `--namespace <namespace>` | Optional | The namespace that users want to check the quota with. Only the SageMaker managed namespaces are supported. |
164
+ | `--output <json|table>` | Optional | The output format. Available values are `table` and `json`. The default value is `json`. |
165
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
152
166
 
153
167
  ### Connecting to a Cluster
154
168
 
155
169
  This command configures the local Kubectl environment to interact with the specified SageMaker HyperPod cluster and namespace.
156
170
 
157
- ```
158
- hyp set-cluster-context --cluster-name <cluster-name> [--namespace <namespace>]
171
+ ```bash
172
+ hyp set-cluster-context --cluster-name <cluster-name>
159
173
  ```
160
174
 
161
- * `cluster-name` (string) - Required. The SageMaker HyperPod cluster name to configure with.
162
- * `namespace` (string) - Optional. The namespace that you want to connect to. If not specified, Hyperpod cli commands will auto discover the accessible namespace.
175
+ | Option | Type | Description |
176
+ |--------|------|-------------|
177
+ | `--cluster-name <cluster-name>` | Required | The SageMaker HyperPod cluster name to configure with. |
178
+ | `--namespace <namespace>` | Optional | The namespace that you want to connect to. If not specified, Hyperpod cli commands will auto discover the accessible namespace. |
179
+ | `--region <region>` | Optional | The AWS region where the HyperPod cluster resides. |
180
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
163
181
 
164
182
  ### Getting Cluster Context
165
183
 
166
184
  Get all the context related to the current set Cluster
167
185
 
168
- ```
186
+ ```bash
169
187
  hyp get-cluster-context
170
188
  ```
171
189
 
190
+ | Option | Type | Description |
191
+ |--------|------|-------------|
192
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
193
+
172
194
  ### Listing Pods
173
195
 
174
196
  This command lists all the pods associated with a specific training job.
175
197
 
176
- ```
198
+ ```bash
177
199
  hyp list-pods hyp-pytorch-job --job-name <job-name>
178
200
  ```
179
201
 
@@ -183,21 +205,106 @@ hyp list-pods hyp-pytorch-job --job-name <job-name>
183
205
 
184
206
  This command retrieves the logs for a specific pod within a training job.
185
207
 
186
- ```
208
+ ```bash
187
209
  hyp get-logs hyp-pytorch-job --pod-name <pod-name> --job-name <job-name>
188
210
  ```
189
211
 
190
- * `job-name` (string) - Required. The name of the job to get the log for.
191
- * `pod-name` (string) - Required. The name of the pod to get the log from.
212
+ | Option | Type | Description |
213
+ |--------|------|-------------|
214
+ | `--job-name <job-name>` | Required | The name of the job to get the log for. |
215
+ | `--pod-name <pod-name>` | Required | The name of the pod to get the log from. |
216
+ | `--namespace <namespace>` | Optional | The namespace of the job. Defaults to 'default'. |
217
+ | `--container <container>` | Optional | The container name to get logs from. |
218
+
219
+
220
+ ## CLI
221
+
222
+ ### Cluster Management
223
+
224
+ **Important**: For commands that accept the `--region` option, if no region is explicitly provided, the command will use the default region from your AWS credentials configuration.
225
+
226
+ **Cluster stack names must be unique within each AWS region.** If you attempt to create a cluster stack with a name that already exists in the same region, the deployment will fail.
227
+
228
+ #### Initialize Cluster Configuration
229
+
230
+ Initialize a new cluster configuration in the current directory:
231
+
232
+ ```bash
233
+ hyp init cluster-stack
234
+ ```
235
+
236
+ **Important**: The `resource_name_prefix` parameter in the generated `config.yaml` file serves as the primary identifier for all AWS resources created during deployment. Each deployment must use a unique resource name prefix to avoid conflicts. This prefix is automatically appended with a unique identifier during cluster creation to ensure resource uniqueness.
192
237
 
238
+ #### Configure Cluster Parameters
193
239
 
194
- ### CLI
240
+ Configure cluster parameters interactively or via command line:
241
+
242
+ ```bash
243
+ hyp configure --resource-name-prefix my-cluster --stage prod
244
+ ```
245
+
246
+ #### Validate Configuration
247
+
248
+ Validate the configuration file syntax:
249
+
250
+ ```bash
251
+ hyp validate
252
+ ```
253
+
254
+ #### Create Cluster Stack
255
+
256
+ Create the cluster stack using the configured parameters:
257
+
258
+ ```bash
259
+ hyp create
260
+ ```
261
+
262
+ **Note**: The region is determined from your AWS configuration or can be specified during the init experience.
263
+
264
+ #### List Cluster Stacks
265
+
266
+ ```bash
267
+ hyp list cluster-stack
268
+ ```
269
+
270
+ | Option | Type | Description |
271
+ |--------|------|-------------|
272
+ | `--region <region>` | Optional | The AWS region to list stacks from. |
273
+ | `--status "['CREATE_COMPLETE', 'UPDATE_COMPLETE']"` | Optional | Filter by stack status. |
274
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
275
+
276
+ #### Describe Cluster Stack
277
+
278
+ ```bash
279
+ hyp describe cluster-stack <stack-name>
280
+ ```
281
+
282
+ | Option | Type | Description |
283
+ |--------|------|-------------|
284
+ | `--region <region>` | Optional | The AWS region where the stack exists. |
285
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
286
+
287
+ #### Update Existing Cluster
288
+
289
+ ```bash
290
+ hyp update cluster --cluster-name my-cluster \
291
+ --instance-groups '[{"InstanceCount":2,"InstanceGroupName":"worker-nodes","InstanceType":"ml.m5.large"}]' \
292
+ --node-recovery Automatic
293
+ ```
294
+
295
+ #### Reset Configuration
296
+
297
+ Reset configuration to default values:
298
+
299
+ ```bash
300
+ hyp reset
301
+ ```
195
302
 
196
303
  ### Training
197
304
 
198
305
  #### Creating a Training Job
199
306
 
200
- ```
307
+ ```bash
201
308
  hyp create hyp-pytorch-job \
202
309
  --version 1.0 \
203
310
  --job-name test-pytorch-job \
@@ -237,33 +344,35 @@ Key required parameters explained:
237
344
 
238
345
  Pre-trained Jumpstart models can be gotten from https://sagemaker.readthedocs.io/en/v2.82.0/doc_utils/jumpstart.html and fed into the call for creating the endpoint
239
346
 
240
- ```
347
+ ```bash
241
348
  hyp create hyp-jumpstart-endpoint \
242
349
  --version 1.0 \
243
350
  --model-id jumpstart-model-id\
244
351
  --instance-type ml.g5.8xlarge \
245
- --endpoint-name endpoint-jumpstart \
352
+ --endpoint-name endpoint-jumpstart
246
353
  ```
247
354
 
248
355
 
249
356
  #### Invoke a JumpstartModel Endpoint
250
357
 
251
- ```
252
- hyp invoke hyp-jumpstart-endpoint \
358
+ ```bash
359
+ hyp invoke hyp-custom-endpoint \
253
360
  --endpoint-name endpoint-jumpstart \
254
361
  --body '{"inputs":"What is the capital of USA?"}'
255
362
  ```
256
363
 
364
+ **Note**: Both JumpStart and custom endpoints use the same invoke command.
365
+
257
366
  #### Managing an Endpoint
258
367
 
259
- ```
368
+ ```bash
260
369
  hyp list hyp-jumpstart-endpoint
261
370
  hyp describe hyp-jumpstart-endpoint --name endpoint-jumpstart
262
371
  ```
263
372
 
264
373
  #### Creating a Custom Inference Endpoint
265
374
 
266
- ```
375
+ ```bash
267
376
  hyp create hyp-custom-endpoint \
268
377
  --version 1.0 \
269
378
  --endpoint-name my-custom-endpoint \
@@ -276,39 +385,102 @@ hyp create hyp-custom-endpoint \
276
385
  --instance-type ml.g5.8xlarge \
277
386
  --image-uri 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:latest \
278
387
  --container-port 8080
279
-
280
388
  ```
281
389
 
282
390
  #### Invoke a Custom Inference Endpoint
283
391
 
284
- ```
392
+ ```bash
285
393
  hyp invoke hyp-custom-endpoint \
286
394
  --endpoint-name endpoint-custom-pytorch \
287
395
  --body '{"inputs":"What is the capital of USA?"}'
288
-
289
396
  ```
290
397
 
291
398
  #### Deleting an Endpoint
292
399
 
293
- ```
400
+ ```bash
294
401
  hyp delete hyp-jumpstart-endpoint --name endpoint-jumpstart
295
402
  ```
296
403
 
297
404
 
298
405
  ## SDK
299
406
 
300
- Along with the CLI, we also have SDKs available that can perform the training and inference functionalities that the CLI performs
407
+ Along with the CLI, we also have SDKs available that can perform the cluster management, training and inference functionalities that the CLI performs
301
408
 
302
- ### Training SDK
409
+ ### Cluster Management SDK
303
410
 
304
- #### Creating a Training Job
411
+ #### Creating a Cluster Stack
305
412
 
413
+ ```python
414
+ from sagemaker.hyperpod.cluster_management.hp_cluster_stack import HpClusterStack
415
+
416
+ # Initialize cluster stack configuration
417
+ cluster_stack = HpClusterStack(
418
+ stage="prod",
419
+ resource_name_prefix="my-hyperpod",
420
+ hyperpod_cluster_name="my-hyperpod-cluster",
421
+ eks_cluster_name="my-hyperpod-eks",
422
+
423
+ # Infrastructure components
424
+ create_vpc_stack=True,
425
+ create_eks_cluster_stack=True,
426
+ create_hyperpod_cluster_stack=True,
427
+
428
+ # Network configuration
429
+ vpc_cidr="10.192.0.0/16",
430
+ availability_zone_ids=["use2-az1", "use2-az2"],
431
+
432
+ # Instance group configuration
433
+ instance_group_settings=[
434
+ {
435
+ "InstanceCount": 1,
436
+ "InstanceGroupName": "controller-group",
437
+ "InstanceType": "ml.t3.medium",
438
+ "TargetAvailabilityZoneId": "use2-az2"
439
+ }
440
+ ]
441
+ )
442
+
443
+ # Create the cluster stack
444
+ response = cluster_stack.create(region="us-east-2")
445
+ ```
446
+
447
+ #### Listing Cluster Stacks
448
+
449
+ ```python
450
+ # List all cluster stacks
451
+ stacks = HpClusterStack.list(region="us-east-2")
452
+ print(f"Found {len(stacks['StackSummaries'])} stacks")
453
+ ```
454
+
455
+ #### Describing a Cluster Stack
456
+
457
+ ```python
458
+ # Describe a specific cluster stack
459
+ stack_info = HpClusterStack.describe("my-stack-name", region="us-east-2")
460
+ print(f"Stack status: {stack_info['Stacks'][0]['StackStatus']}")
306
461
  ```
307
462
 
308
- from sagemaker.hyperpod.training import HyperPodPytorchJob
309
- from sagemaker.hyperpod.training
310
- import ReplicaSpec, Template, Spec, Containers, Resources, RunPolicy
311
- from sagemaker.hyperpod.common.config import Metadata
463
+ #### Monitoring Cluster Status
464
+
465
+ ```python
466
+ from sagemaker.hyperpod.cluster_management.hp_cluster_stack import HpClusterStack
467
+
468
+ stack = HpClusterStack()
469
+ response = stack.create(region="us-west-2")
470
+ status = stack.get_status(region="us-west-2")
471
+ print(status)
472
+ ```
473
+
474
+ ### Training SDK
475
+
476
+ #### Creating a Training Job
477
+
478
+ ```python
479
+ from sagemaker.hyperpod.training.hyperpod_pytorch_job import HyperPodPytorchJob
480
+ from sagemaker.hyperpod.training.config.hyperpod_pytorch_job_unified_config import (
481
+ ReplicaSpec, Template, Spec, Containers, Resources, RunPolicy
482
+ )
483
+ from sagemaker.hyperpod.common.config.metadata import Metadata
312
484
 
313
485
  # Define job specifications
314
486
  nproc_per_node = "1" # Number of processes per node
@@ -486,11 +658,9 @@ custom_endpoint.delete()
486
658
  ```
487
659
 
488
660
  #### Observability - Getting Monitoring Information
489
- ```
490
- from sagemaker.hyperpod.utils import get_monitoring_config,
661
+ ```python
662
+ from sagemaker.hyperpod.observability.utils import get_monitoring_config
491
663
  monitor_config = get_monitoring_config()
492
- monitor_config.grafanaURL
493
- monitor_config.prometheusURL
494
664
  ```
495
665
 
496
666
  ## Disclaimer