Skip to content

Commit c8bf891

Browse files
Aditi2424adishaamaheshxbjiayelamazon
authored
Change to tabbed view for CLI/ SDK (#152)
* Update telemetry status to be Integer for parity (#130) Co-authored-by: adishaa <[email protected]> * Release new version for Health Monitoring Agent (1.0.643.0_1.0.192.0) with minor improvements and bug fixes (#137) * Release new version for Health Monitoring Agent (1.0.674.0_1.0.199.0) with minor improvements and bug fixes. (#139) * documentation working setup * training inference documentation changes * Add more inference examples * UI changes for documentation * Change to tabbed view for CLI and SDK * Change to tabbed view getting started page * clean up custom css --------- Co-authored-by: adishaa <[email protected]> Co-authored-by: maheshxb <[email protected]> Co-authored-by: jiayelamazon <[email protected]>
1 parent a475d94 commit c8bf891

File tree

5 files changed

+101
-43
lines changed

5 files changed

+101
-43
lines changed

doc/_static/custom.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@
2222
/* Header styling */
2323
header {
2424
background-color: white;
25-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* shadow-sm */
25+
26+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
2627
position: sticky;
2728
top: 0;
2829
z-index: 50;
2930
}
3031

31-
/* Preserving your existing typography */
3232
h1 {
33-
font-size: 1.875rem; /* text-3xl */
34-
font-weight: 700; /* font-bold */
35-
color: #111827; /* text-gray-900 */
33+
font-size: 1.875rem;
34+
font-weight: 700;
35+
color: #111827;
3636
}
3737

3838
h2 {
39-
font-size: 1.5rem; /* text-2xl */
40-
font-weight: 700; /* font-bold */
39+
font-size: 1.5rem;
40+
font-weight: 700;
4141
color: #111827;
4242
}
4343

@@ -48,6 +48,6 @@ h3 {
4848
}
4949

5050
p {
51-
font-size: 0.875rem; /* Tailwind's text-sm */
52-
color: #4b5563; /* Tailwind's gray-600 */
51+
font-size: 0.875rem;
52+
color: #4b5563;
5353
}

doc/getting_started.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ This guide will help you get started with the SageMaker HyperPod CLI and SDK to
1010

1111
List all available SageMaker HyperPod clusters in your account:
1212

13-
**CLI**
13+
`````{tab-set}
14+
````{tab-item} CLI
1415
```bash
1516
hyp list-cluster [--region <region>] [--namespace <namespace>] [--output <json|table>]
1617
```
18+
````
1719
18-
**SDK**
20+
````{tab-item} SDK
1921
```python
2022
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager
2123
2224
clusters = HyperPodManager.list_clusters(region='us-east-2')
2325
print(clusters)
2426
```
27+
````
28+
`````
2529

2630
**Parameters:**
2731
- `region` (string) - Optional. The AWS region where the SageMaker HyperPod and EKS clusters are located. If not specified, uses the region from your current AWS account credentials.
@@ -32,17 +36,21 @@ print(clusters)
3236

3337
Configure your local kubectl environment to interact with a specific SageMaker HyperPod cluster and namespace:
3438

35-
**CLI**
39+
`````{tab-set}
40+
````{tab-item} CLI
3641
```bash
3742
hyp set-cluster-context --cluster-name <cluster-name> [--namespace <namespace>]
3843
```
44+
````
3945
40-
**SDK**
46+
````{tab-item} SDK
4147
```python
4248
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager
4349
4450
HyperPodManager.set_context('<hyperpod-cluster-name>', region='us-east-2')
4551
```
52+
````
53+
`````
4654

4755
**Parameters:**
4856
- `cluster-name` (string) - Required. The SageMaker HyperPod cluster name to configure with.
@@ -52,36 +60,44 @@ HyperPodManager.set_context('<hyperpod-cluster-name>', region='us-east-2')
5260

5361
View information about the currently configured cluster context:
5462

55-
**CLI**
63+
`````{tab-set}
64+
````{tab-item} CLI
5665
```bash
5766
hyp get-cluster-context
5867
```
68+
````
5969
60-
**SDK**
70+
````{tab-item} SDK
6171
```python
6272
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager
6373
6474
# Get current context information
6575
context = HyperPodManager.get_context()
6676
print(context)
6777
```
78+
````
79+
`````
6880

6981
## Job Management
7082

7183
### List Pods for a Training Job
7284

7385
View all pods associated with a specific training job:
7486

75-
**CLI**
87+
`````{tab-set}
88+
````{tab-item} CLI
7689
```bash
7790
hyp list-pods hyp-pytorch-job --job-name <job-name>
7891
```
92+
````
7993
80-
**SDK**
94+
````{tab-item} SDK
8195
```python
8296
# List all pods created for this job
8397
pytorch_job.list_pods()
8498
```
99+
````
100+
`````
85101

86102
**Parameters:**
87103
- `job-name` (string) - Required. The name of the job to list pods for.
@@ -90,16 +106,20 @@ pytorch_job.list_pods()
90106

91107
View logs for a specific pod within a training job:
92108

93-
**CLI**
109+
`````{tab-set}
110+
````{tab-item} CLI
94111
```bash
95112
hyp get-logs hyp-pytorch-job --pod-name <pod-name> --job-name <job-name>
96113
```
114+
````
97115
98-
**SDK**
116+
````{tab-item} SDK
99117
```python
100118
# Check the logs from pod0
101119
pytorch_job.get_logs_from_pod("demo-pod-0")
102120
```
121+
````
122+
`````
103123

104124
**Parameters:**
105125
- `job-name` (string) - Required. The name of the job to get logs for.

doc/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ API reference <_apidoc/modules>
1616

1717
SageMaker HyperPod CLI and SDK provide a seamless way to manage distributed training and inference workloads on EKS-hosted SageMaker HyperPod clusters—without needing Kubernetes expertise. Use the powerful CLI to launch and monitor training jobs and endpoints, or leverage the Python SDK to do the same programmatically with minimal code, including support for JumpStart models, custom endpoints, and built-in monitoring.
1818

19+
## Start Here
20+
1921
::::{container}
2022
::::{grid} 1 2 4 4
2123
:gutter: 3

doc/inference.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ You can create inference endpoints using either JumpStart models or custom model
2121

2222
### JumpStart Model Endpoints
2323

24-
**CLI**
24+
`````{tab-set}
25+
````{tab-item} CLI
2526
```bash
2627
hyp create hyp-jumpstart-endpoint \
2728
--version 1.0 \
@@ -30,8 +31,9 @@ hyp create hyp-jumpstart-endpoint \
3031
--endpoint-name endpoint-jumpstart \
3132
--tls-output-s3-uri s3://sample-bucket
3233
```
34+
````
3335
34-
**SDK**
36+
````{tab-item} SDK
3537
```python
3638
from sagemaker.hyperpod.inference import HyperPodJumpstartEndpoint
3739
@@ -46,10 +48,13 @@ endpoint = HyperPodJumpstartEndpoint(
4648
# Deploy the endpoint
4749
endpoint.create()
4850
```
51+
````
52+
`````
4953

5054
### Custom Model Endpoints
5155

52-
**CLI**
56+
`````{tab-set}
57+
````{tab-item} CLI
5358
```bash
5459
hyp create hyp-custom-endpoint \
5560
--version 1.0 \
@@ -59,8 +64,9 @@ hyp create hyp-custom-endpoint \
5964
--instance-type ml.g5.8xlarge \
6065
--tls-output-s3-uri s3://sample-bucket
6166
```
67+
````
6268
63-
**SDK**
69+
````{tab-item} SDK
6470
```python
6571
from sagemaker.hyperpod.inference import HyperPodCustomEndpoint
6672
@@ -76,6 +82,8 @@ endpoint = HyperPodCustomEndpoint(
7682
# Deploy the endpoint
7783
endpoint.create()
7884
```
85+
````
86+
`````
7987

8088
## Key Parameters
8189

@@ -92,16 +100,18 @@ When creating an inference endpoint, you'll need to specify:
92100

93101
### List Endpoints
94102

95-
**CLI**
103+
`````{tab-set}
104+
````{tab-item} CLI
96105
```bash
97106
# List JumpStart endpoints
98107
hyp list hyp-jumpstart-endpoint
99108
100109
# List custom endpoints
101110
hyp list hyp-custom-endpoint
102111
```
112+
````
103113
104-
**SDK**
114+
````{tab-item} SDK
105115
```python
106116
from sagemaker.hyperpod.inference import HyperPodJumpstartEndpoint, HyperPodCustomEndpoint
107117
@@ -113,19 +123,23 @@ print(jumpstart_endpoints)
113123
custom_endpoints = HyperPodCustomEndpoint.list()
114124
print(custom_endpoints)
115125
```
126+
````
127+
`````
116128

117129
### Describe an Endpoint
118130

119-
**CLI**
131+
`````{tab-set}
132+
````{tab-item} CLI
120133
```bash
121134
# Describe JumpStart endpoint
122135
hyp describe hyp-jumpstart-endpoint --endpoint-name <endpoint-name>
123136
124137
# Describe custom endpoint
125138
hyp describe hyp-custom-endpoint --endpoint-name <endpoint-name>
126139
```
140+
````
127141
128-
**SDK**
142+
````{tab-item} SDK
129143
```python
130144
from sagemaker.hyperpod.inference import HyperPodJumpstartEndpoint, HyperPodCustomEndpoint
131145
@@ -139,19 +153,23 @@ custom_endpoint = HyperPodCustomEndpoint.load(endpoint_name="endpoint-custom")
139153
custom_details = custom_endpoint.describe()
140154
print(custom_details)
141155
```
156+
````
157+
`````
142158

143159
### Invoke an Endpoint
144160

145-
**CLI**
161+
`````{tab-set}
162+
````{tab-item} CLI
146163
```bash
147164
# Invoke custom endpoint
148165
hyp invoke hyp-custom-endpoint \
149166
--endpoint-name <endpoint-name> \
150167
--content-type "application/json" \
151168
--payload '{"inputs": "What is machine learning?"}'
152169
```
170+
````
153171
154-
**SDK**
172+
````{tab-item} SDK
155173
```python
156174
from sagemaker.hyperpod.inference import HyperPodCustomEndpoint
157175
@@ -165,19 +183,23 @@ response = endpoint.invoke(
165183
)
166184
print(response)
167185
```
186+
````
187+
`````
168188

169189
### Delete an Endpoint
170190

171-
**CLI**
191+
`````{tab-set}
192+
````{tab-item} CLI
172193
```bash
173194
# Delete JumpStart endpoint
174195
hyp delete hyp-jumpstart-endpoint --endpoint-name <endpoint-name>
175196
176197
# Delete custom endpoint
177198
hyp delete hyp-custom-endpoint --endpoint-name <endpoint-name>
178199
```
200+
````
179201
180-
**SDK**
202+
````{tab-item} SDK
181203
```python
182204
from sagemaker.hyperpod.inference import HyperPodJumpstartEndpoint, HyperPodCustomEndpoint
183205
@@ -189,6 +211,8 @@ jumpstart_endpoint.delete()
189211
custom_endpoint = HyperPodCustomEndpoint.load(endpoint_name="endpoint-custom")
190212
custom_endpoint.delete()
191213
```
214+
````
215+
`````
192216

193217
## Inference Example Notebooks
194218

0 commit comments

Comments
 (0)