Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
/* Header styling */
header {
background-color: white;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* shadow-sm */

box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
position: sticky;
top: 0;
z-index: 50;
}

/* Preserving your existing typography */
h1 {
font-size: 1.875rem; /* text-3xl */
font-weight: 700; /* font-bold */
color: #111827; /* text-gray-900 */
font-size: 1.875rem;
font-weight: 700;
color: #111827;
}

h2 {
font-size: 1.5rem; /* text-2xl */
font-weight: 700; /* font-bold */
font-size: 1.5rem;
font-weight: 700;
color: #111827;
}

Expand All @@ -48,6 +48,6 @@ h3 {
}

p {
font-size: 0.875rem; /* Tailwind's text-sm */
color: #4b5563; /* Tailwind's gray-600 */
font-size: 0.875rem;
color: #4b5563;
}
12 changes: 12 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
"""Sphinx configuration."""

import datetime
Expand Down
40 changes: 30 additions & 10 deletions doc/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ This guide will help you get started with the SageMaker HyperPod CLI and SDK to

List all available SageMaker HyperPod clusters in your account:

**CLI**
`````{tab-set}
````{tab-item} CLI
```bash
hyp list-cluster [--region <region>] [--namespace <namespace>] [--output <json|table>]
```
````

**SDK**
````{tab-item} SDK
```python
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager

clusters = HyperPodManager.list_clusters(region='us-east-2')
print(clusters)
```
````
`````

**Parameters:**
- `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.
Expand All @@ -32,17 +36,21 @@ print(clusters)

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

**CLI**
`````{tab-set}
````{tab-item} CLI
```bash
hyp set-cluster-context --cluster-name <cluster-name> [--namespace <namespace>]
```
````

**SDK**
````{tab-item} SDK
```python
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager

HyperPodManager.set_context('<hyperpod-cluster-name>', region='us-east-2')
```
````
`````

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

View information about the currently configured cluster context:

**CLI**
`````{tab-set}
````{tab-item} CLI
```bash
hyp get-cluster-context
```
````

**SDK**
````{tab-item} SDK
```python
from sagemaker.hyperpod.hyperpod_manager import HyperPodManager

# Get current context information
context = HyperPodManager.get_context()
print(context)
```
````
`````

## Job Management

### List Pods for a Training Job

View all pods associated with a specific training job:

**CLI**
`````{tab-set}
````{tab-item} CLI
```bash
hyp list-pods hyp-pytorch-job --job-name <job-name>
```
````

**SDK**
````{tab-item} SDK
```python
# List all pods created for this job
pytorch_job.list_pods()
```
````
`````

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

View logs for a specific pod within a training job:

**CLI**
`````{tab-set}
````{tab-item} CLI
```bash
hyp get-logs hyp-pytorch-job --pod-name <pod-name> --job-name <job-name>
```
````

**SDK**
````{tab-item} SDK
```python
# Check the logs from pod0
pytorch_job.get_logs_from_pod("demo-pod-0")
```
````
`````

**Parameters:**
- `job-name` (string) - Required. The name of the job to get logs for.
Expand Down
2 changes: 2 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ API reference <_apidoc/modules>

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.

## Start Here

::::{container}
::::{grid} 1 2 4 4
:gutter: 3
Expand Down
Loading