sagemaker-hyperpod 3.2.0__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.0/src/sagemaker_hyperpod.egg-info → sagemaker_hyperpod-3.2.2}/PKG-INFO +221 -50
  2. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/README.md +219 -49
  3. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/pyproject.toml +1 -1
  4. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/setup.py +3 -4
  5. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_endpoint.py +4 -1
  6. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_endpoint_base.py +2 -1
  7. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/hp_jumpstart_endpoint.py +4 -1
  8. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2/src/sagemaker_hyperpod.egg-info}/PKG-INFO +221 -50
  9. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/requires.txt +1 -0
  10. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/LICENSE +0 -0
  11. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/NOTICE +0 -0
  12. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/setup.cfg +0 -0
  13. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/__init__.py +0 -0
  14. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/__init__.py +0 -0
  15. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/__init__.py +0 -0
  16. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/clients/__init__.py +0 -0
  17. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/clients/kubernetes_client.py +0 -0
  18. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/__init__.py +0 -0
  19. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/cluster.py +0 -0
  20. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/cluster_stack.py +0 -0
  21. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/inference.py +0 -0
  22. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/init.py +0 -0
  23. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/commands/training.py +0 -0
  24. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/common_utils.py +0 -0
  25. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/__init__.py +0 -0
  26. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/command_constants.py +0 -0
  27. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/exception_constants.py +0 -0
  28. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/hyperpod_instance_types.py +0 -0
  29. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/init_constants.py +0 -0
  30. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/kueue_constants.py +0 -0
  31. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/constants/pytorch_constants.py +0 -0
  32. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/hyp_cli.py +0 -0
  33. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/inference_utils.py +0 -0
  34. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/init_utils.py +0 -0
  35. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/__init__.py +0 -0
  36. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/cancel_training_job.py +0 -0
  37. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/discover_namespaces.py +0 -0
  38. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/exec_command.py +0 -0
  39. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_logs.py +0 -0
  40. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_namespaces.py +0 -0
  41. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/get_training_job.py +0 -0
  42. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/list_pods.py +0 -0
  43. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/list_training_jobs.py +0 -0
  44. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/service/self_subject_access_review.py +0 -0
  45. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/__init__.py +0 -0
  46. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/cfn_cluster_creation.py +0 -0
  47. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_custom_endpoint_template.py +0 -0
  48. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_js_endpoint_template.py +0 -0
  49. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/templates/k8s_pytorch_job_template.py +0 -0
  50. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/training_utils.py +0 -0
  51. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/utils.py +0 -0
  52. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/__init__.py +0 -0
  53. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/cluster_validator.py +0 -0
  54. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/job_validator.py +0 -0
  55. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cli/validators/validator.py +0 -0
  56. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/__init__.py +0 -0
  57. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/config/__init__.py +0 -0
  58. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/config/hp_cluster_stack_config.py +0 -0
  59. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/cluster_management/hp_cluster_stack.py +0 -0
  60. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/__init__.py +0 -0
  61. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/cli_decorators.py +0 -0
  62. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/config/__init__.py +0 -0
  63. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/config/metadata.py +0 -0
  64. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/exceptions/__init__.py +0 -0
  65. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/__init__.py +0 -0
  66. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/constants.py +0 -0
  67. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/telemetry_logging.py +0 -0
  68. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/telemetry/user_agent.py +0 -0
  69. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/common/utils.py +0 -0
  70. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/__init__.py +0 -0
  71. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/__init__.py +0 -0
  72. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/constants.py +0 -0
  73. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/hp_endpoint_config.py +0 -0
  74. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/config/hp_jumpstart_endpoint_config.py +0 -0
  75. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/inference/jumpstart_public_hub_visualization_utils.py +0 -0
  76. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/MonitoringConfig.py +0 -0
  77. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/__init__.py +0 -0
  78. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/constants.py +0 -0
  79. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/observability/utils.py +0 -0
  80. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/__init__.py +0 -0
  81. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/config/__init__.py +0 -0
  82. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/config/hyperpod_pytorch_job_unified_config.py +0 -0
  83. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/hyperpod_pytorch_job.py +0 -0
  84. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker/hyperpod/training/quota_allocation_util.py +0 -0
  85. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/SOURCES.txt +0 -0
  86. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/dependency_links.txt +0 -0
  87. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/entry_points.txt +0 -0
  88. {sagemaker_hyperpod-3.2.0 → sagemaker_hyperpod-3.2.2}/src/sagemaker_hyperpod.egg-info/top_level.txt +0 -0
  89. {sagemaker_hyperpod-3.2.0 → 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.0
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
@@ -47,6 +47,7 @@ Requires-Dist: pydantic<3.0.0,>=2.10.6
47
47
  Requires-Dist: hyperpod-pytorch-job-template<2.0.0,>=1.0.0
48
48
  Requires-Dist: hyperpod-custom-inference-template<2.0.0,>=1.0.0
49
49
  Requires-Dist: hyperpod-jumpstart-inference-template<2.0.0,>=1.0.0
50
+ Requires-Dist: hyperpod-cluster-stack-template<2.0.0,>=1.0.0
50
51
  Dynamic: home-page
51
52
  Dynamic: license-file
52
53
  Dynamic: requires-dist
@@ -73,24 +74,33 @@ Note: Old `hyperpod`CLI V2 has been moved to `release_v2` branch. Please refer [
73
74
  - [Getting Cluster Context](#getting-cluster-context)
74
75
  - [Listing Pods](#listing-pods)
75
76
  - [Accessing Logs](#accessing-logs)
76
- - [CLI](#cli-)
77
- - [Training](#training-)
78
- - [Inference](#inference-)
79
- - [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)
80
83
  - [Training](#training-sdk)
81
84
  - [Inference](#inference-sdk)
85
+ - [Examples](#examples)
82
86
 
83
87
 
84
88
  ## Overview
85
89
 
86
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.
87
91
 
88
- ## 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
89
99
 
90
100
  - HyperPod CLI currently supports starting PyTorchJobs. To start a job, you need to install Training Operator first.
91
101
  - You can follow [pytorch operator doc](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-eks-operator-install.html) to install it.
92
102
 
93
- ## Prerequisites for Inference
103
+ ### Prerequisites for Inference
94
104
 
95
105
  - HyperPod CLI supports creating Inference Endpoints through jumpstart and through custom Endpoint config
96
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.
@@ -110,13 +120,13 @@ SageMaker HyperPod CLI currently supports start training job with:
110
120
 
111
121
  2. Install the sagemaker-hyperpod-cli package.
112
122
 
113
- ```
123
+ ```bash
114
124
  pip install sagemaker-hyperpod
115
125
  ```
116
126
 
117
127
  3. Verify if the installation succeeded by running the following command.
118
128
 
119
- ```
129
+ ```bash
120
130
  hyp --help
121
131
  ```
122
132
 
@@ -129,10 +139,12 @@ The HyperPod CLI provides the following commands:
129
139
  - [Getting Cluster Context](#getting-cluster-context)
130
140
  - [Listing Pods](#listing-pods)
131
141
  - [Accessing Logs](#accessing-logs)
132
- - [CLI](#cli-)
133
- - [Training](#training-)
134
- - [Inference](#inference-)
135
- - [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)
136
148
  - [Training](#training-sdk)
137
149
  - [Inference](#inference-sdk)
138
150
 
@@ -141,38 +153,49 @@ The HyperPod CLI provides the following commands:
141
153
 
142
154
  This command lists the available SageMaker HyperPod clusters and their capacity information.
143
155
 
144
- ```
145
- hyp list-cluster [--region <region>] [--namespace <namespace>] [--output <json|table>]
156
+ ```bash
157
+ hyp list-cluster
146
158
  ```
147
159
 
148
- * `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.
149
- * `namespace` (string) - Optional. The namespace that users want to check the quota with. Only the SageMaker managed namespaces are supported.
150
- * `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. |
151
166
 
152
167
  ### Connecting to a Cluster
153
168
 
154
169
  This command configures the local Kubectl environment to interact with the specified SageMaker HyperPod cluster and namespace.
155
170
 
156
- ```
157
- hyp set-cluster-context --cluster-name <cluster-name> [--namespace <namespace>]
171
+ ```bash
172
+ hyp set-cluster-context --cluster-name <cluster-name>
158
173
  ```
159
174
 
160
- * `cluster-name` (string) - Required. The SageMaker HyperPod cluster name to configure with.
161
- * `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. |
162
181
 
163
182
  ### Getting Cluster Context
164
183
 
165
184
  Get all the context related to the current set Cluster
166
185
 
167
- ```
186
+ ```bash
168
187
  hyp get-cluster-context
169
188
  ```
170
189
 
190
+ | Option | Type | Description |
191
+ |--------|------|-------------|
192
+ | `--debug` | Optional | Enable debug mode for detailed logging. |
193
+
171
194
  ### Listing Pods
172
195
 
173
196
  This command lists all the pods associated with a specific training job.
174
197
 
175
- ```
198
+ ```bash
176
199
  hyp list-pods hyp-pytorch-job --job-name <job-name>
177
200
  ```
178
201
 
@@ -182,21 +205,106 @@ hyp list-pods hyp-pytorch-job --job-name <job-name>
182
205
 
183
206
  This command retrieves the logs for a specific pod within a training job.
184
207
 
185
- ```
208
+ ```bash
186
209
  hyp get-logs hyp-pytorch-job --pod-name <pod-name> --job-name <job-name>
187
210
  ```
188
211
 
189
- * `job-name` (string) - Required. The name of the job to get the log for.
190
- * `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.
191
237
 
238
+ #### Configure Cluster Parameters
192
239
 
193
- ### 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
+ ```
194
302
 
195
303
  ### Training
196
304
 
197
305
  #### Creating a Training Job
198
306
 
199
- ```
307
+ ```bash
200
308
  hyp create hyp-pytorch-job \
201
309
  --version 1.0 \
202
310
  --job-name test-pytorch-job \
@@ -236,33 +344,35 @@ Key required parameters explained:
236
344
 
237
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
238
346
 
239
- ```
347
+ ```bash
240
348
  hyp create hyp-jumpstart-endpoint \
241
349
  --version 1.0 \
242
350
  --model-id jumpstart-model-id\
243
351
  --instance-type ml.g5.8xlarge \
244
- --endpoint-name endpoint-jumpstart \
352
+ --endpoint-name endpoint-jumpstart
245
353
  ```
246
354
 
247
355
 
248
356
  #### Invoke a JumpstartModel Endpoint
249
357
 
250
- ```
251
- hyp invoke hyp-jumpstart-endpoint \
358
+ ```bash
359
+ hyp invoke hyp-custom-endpoint \
252
360
  --endpoint-name endpoint-jumpstart \
253
361
  --body '{"inputs":"What is the capital of USA?"}'
254
362
  ```
255
363
 
364
+ **Note**: Both JumpStart and custom endpoints use the same invoke command.
365
+
256
366
  #### Managing an Endpoint
257
367
 
258
- ```
368
+ ```bash
259
369
  hyp list hyp-jumpstart-endpoint
260
370
  hyp describe hyp-jumpstart-endpoint --name endpoint-jumpstart
261
371
  ```
262
372
 
263
373
  #### Creating a Custom Inference Endpoint
264
374
 
265
- ```
375
+ ```bash
266
376
  hyp create hyp-custom-endpoint \
267
377
  --version 1.0 \
268
378
  --endpoint-name my-custom-endpoint \
@@ -275,39 +385,102 @@ hyp create hyp-custom-endpoint \
275
385
  --instance-type ml.g5.8xlarge \
276
386
  --image-uri 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-inference:latest \
277
387
  --container-port 8080
278
-
279
388
  ```
280
389
 
281
390
  #### Invoke a Custom Inference Endpoint
282
391
 
283
- ```
392
+ ```bash
284
393
  hyp invoke hyp-custom-endpoint \
285
394
  --endpoint-name endpoint-custom-pytorch \
286
395
  --body '{"inputs":"What is the capital of USA?"}'
287
-
288
396
  ```
289
397
 
290
398
  #### Deleting an Endpoint
291
399
 
292
- ```
400
+ ```bash
293
401
  hyp delete hyp-jumpstart-endpoint --name endpoint-jumpstart
294
402
  ```
295
403
 
296
404
 
297
405
  ## SDK
298
406
 
299
- 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
300
408
 
301
- ### Training SDK
409
+ ### Cluster Management SDK
302
410
 
303
- #### Creating a Training Job
411
+ #### Creating a Cluster Stack
304
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']}")
305
461
  ```
306
462
 
307
- from sagemaker.hyperpod.training import HyperPodPytorchJob
308
- from sagemaker.hyperpod.training
309
- import ReplicaSpec, Template, Spec, Containers, Resources, RunPolicy
310
- 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
311
484
 
312
485
  # Define job specifications
313
486
  nproc_per_node = "1" # Number of processes per node
@@ -485,11 +658,9 @@ custom_endpoint.delete()
485
658
  ```
486
659
 
487
660
  #### Observability - Getting Monitoring Information
488
- ```
489
- from sagemaker.hyperpod.utils import get_monitoring_config,
661
+ ```python
662
+ from sagemaker.hyperpod.observability.utils import get_monitoring_config
490
663
  monitor_config = get_monitoring_config()
491
- monitor_config.grafanaURL
492
- monitor_config.prometheusURL
493
664
  ```
494
665
 
495
666
  ## Disclaimer