diff --git a/doc/conf.py b/doc/conf.py index 814b18cb..dfe7ab3c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -134,6 +134,9 @@ def get_version(): "home_page_in_toc": True } +author = "Amazon Web Services" +copyright = f"{datetime.datetime.now().year}, Amazon Web Services" + htmlhelp_basename = "{}doc".format(project) html_static_path = ["_static"] html_css_files = ["custom.css"] diff --git a/doc/getting_started.md b/doc/getting_started.md index be67d2ee..e0261870 100644 --- a/doc/getting_started.md +++ b/doc/getting_started.md @@ -11,7 +11,7 @@ List all available SageMaker HyperPod clusters in your account: `````{tab-set} ````{tab-item} CLI ```bash -hyp list-cluster [--region ] [--namespace ] [--output ] +hyp list-cluster [--region ] ``` ```` @@ -32,7 +32,7 @@ Configure your local kubectl environment to interact with a specific SageMaker H `````{tab-set} ````{tab-item} CLI ```bash -hyp set-cluster-context --cluster-name [--namespace ] +hyp set-cluster-context --cluster-name ``` ```` @@ -40,7 +40,7 @@ hyp set-cluster-context --cluster-name [--namespace ] ```python from sagemaker.hyperpod import set_cluster_context -set_cluster_context('', region='aws-region') +set_cluster_context('') ``` ```` diff --git a/doc/index.md b/doc/index.md index 412d6814..e04a4471 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,6 +1,15 @@ +--- +keywords: + - distributed + - kubernetes + - pytorch + - monitoring + - jumpstart +--- + (hpcli_docs_mainpage)= -# Overview +# SageMaker HyperPod CLI & SDK ```{toctree} :hidden: @@ -14,49 +23,145 @@ Example Notebooks API reference <_apidoc/modules> ``` -SageMaker HyperPod Command Line Interface (CLI) and Software Development Kit (SDK) provide a seamless way to manage distributed training and inference workloads on EKS-orchestrated 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. +**Manage distributed Machine Learning workloads on Kubernetes clusters without the complexity.** + +The SageMaker HyperPod Command Line Interface and SDK simplify distributed training and inference on EKS-orchestrated clusters. -## Start Here +## Quick Start ::::{container} -::::{grid} 1 2 4 4 +::::{grid} 1 2 2 2 :gutter: 3 :::{grid-item-card} Installation :link: installation :link-type: ref +:class-card: sd-border-primary -Get the CLI/ SDK setup +**New to HyperPod?** Install the CLI/ SDK in minutes. ::: -:::{grid-item-card} Quickstart +:::{grid-item-card} Getting Started :link: getting_started :link-type: ref +:class-card: sd-border-secondary -Beginner's guide to using CLI/ SDK +**Ready to explore?** Connect to your cluster before running ML workflows. ::: -:::{grid-item-card} Training -:link: training -:link-type: ref +:::: +:::: + +## What You Can Do + +::::{container} +::::{grid} 1 1 2 2 +:gutter: 3 + +:::{grid-item-card} Training Workloads +:class-card: sd-border-success -Detailed guide on creating Pytorch training jobs +**Distributed Training** +- HyperPodPytorchJob distributed training +- Multi-node, multi-GPU support +- Built-in monitoring and logging + +```{dropdown} Learn More About Training +:color: success +:icon: chevron-down + +- [Training Guide](training.md) - Complete training workflows +- [Example Notebooks](examples.md) - Hands-on training examples +- Supported frameworks: PyTorch +``` ::: -:::{grid-item-card} Inference -:link: inference -:link-type: ref +:::{grid-item-card} Inference Endpoints +:class-card: sd-border-info + +**Model Serving** +- Deploy models as scalable endpoints +- JumpStart model integration +- Real-time and batch inference -Detailed guide on creating, invoking and monitoring endpoints +```{dropdown} Learn More About Inference +:color: info +:icon: chevron-down + +- [Inference Guide](inference.md) - Complete inference workflows +- [Example Notebooks](examples.md) - Hands-on inference examples +- Supported models: JumpStart models, Custom models +``` ::: -:::{grid-item-card} Example Notebooks -:link: examples -:link-type: ref +:::: +:::: -Notebooks that demonstrate end-to-end workflows +## Choose Your Interface + +::::{container} +::::{grid} 1 1 2 2 +:gutter: 3 + +:::{grid-item-card} Command Line Interface +:class-card: sd-border-warning + +**For DevOps & Quick Tasks** +```bash +# Launch a training job +hyp create hyp-pytorch-job \ + --job-name my-training \ + --image pytorch/pytorch:latest \ +``` + +```{dropdown} CLI Features +:color: warning +:icon: terminal + +- Interactive job management +- Built-in status monitoring +``` +::: + +:::{grid-item-card} Python SDK +:class-card: sd-border-danger + +**For Programmatic Control** +```python +from sagemaker.hyperpod.training import HyperPodPytorchJob +from sagemaker.hyperpod.common.config import Metadata + +pytorch_job = HyperPodPytorchJob( + metadata=Metadata(name="demo"), + nproc_per_node="1", + replica_specs=replica_specs, + run_policy=run_policy, +) + +pytorch_job.create() +``` + +```{dropdown} SDK Features +:color: danger +:icon: code + +- Pythonic API design +- Jupyter notebook integration +- Programmatic job orchestration +``` ::: :::: :::: +## Advanced Resources + +```{dropdown} Complete Documentation +:color: primary +:icon: book + +- [API Reference](_apidoc/modules.rst) - Complete SDK documentation +- [Training Guide](training.md) - In-depth training workflows +- [Inference Guide](inference.md) - Comprehensive inference setup +- [Example Notebooks](examples.md) - End-to-end examples +``` \ No newline at end of file diff --git a/doc/training.md b/doc/training.md index fcbeea9a..181f826a 100644 --- a/doc/training.md +++ b/doc/training.md @@ -1,3 +1,12 @@ +--- +keywords: + - distributed + - kubernetes + - pytorch + - containerized + - orchestration +--- + (training)= # Training with SageMaker HyperPod @@ -23,24 +32,8 @@ You can create training jobs using either the CLI or SDK approach: ````{tab-item} CLI ```bash hyp create hyp-pytorch-job \ - --version 1.0 \ --job-name test-pytorch-job \ --image pytorch/pytorch:latest \ - --command '[python, train.py]' \ - --args '[--epochs=10, --batch-size=32]' \ - --environment '{"PYTORCH_CUDA_ALLOC_CONF": "max_split_size_mb:32"}' \ - --pull-policy "IfNotPresent" \ - --instance-type ml.p4d.24xlarge \ - --tasks-per-node 8 \ - --label-selector '{"accelerator": "nvidia", "network": "efa"}' \ - --deep-health-check-passed-nodes-only true \ - --scheduler-type "kueue" \ - --queue-name "training-queue" \ - --priority "high" \ - --max-retry 3 \ - --volumes '[data-vol, model-vol, checkpoint-vol]' \ - --persistent-volume-claims '[shared-data-pvc, model-registry-pvc]' \ - ``` ```` ````{tab-item} SDK