Skip to content

Commit d2130e9

Browse files
update help text to avoid truncation (#158)
1 parent 0bcee6d commit d2130e9

File tree

4 files changed

+27
-27
lines changed

4 files changed

+27
-27
lines changed

src/sagemaker/hyperpod/cli/commands/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def list_cluster(
120120
debug: bool,
121121
namespace: Optional[List],
122122
):
123-
"""List SageMaker Hyperpod Clusters with cluster metadata.
123+
"""List SageMaker Hyperpod Clusters with metadata.
124124
125125
Example Usage:
126126
1. List clusters with JSON output: hyperpod get-clusters -n hyperpod-ns-test-team
@@ -553,7 +553,7 @@ def get_cluster_context(
553553
debug: bool,
554554
) -> Tuple[Any, str]:
555555
"""
556-
Get all the context related to the current set Cluster
556+
Get context related to the current set cluster.
557557
558558
Args:
559559
debug (bool): Enable debug mode.
@@ -584,7 +584,7 @@ def get_cluster_context(
584584
@click.option("--prometheus", is_flag=True, help="Returns Prometheus Workspace URL")
585585
@click.option("--list", is_flag=True, help="Returns list of available metrics")
586586
def get_monitoring(grafana: bool, prometheus: bool, list: bool) -> None:
587-
"""Get monitoring configurations for Hyperpod cluster"""
587+
"""Get monitoring configurations for Hyperpod cluster."""
588588
try:
589589
if not any([grafana, prometheus, list]):
590590
print("Error: Please select at least one option")

src/sagemaker/hyperpod/cli/commands/inference.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def js_list(
132132
namespace: Optional[str],
133133
):
134134
"""
135-
List jumpstart model endpoints with provided namespace.
135+
List all Hyperpod Jumpstart model endpoints.
136136
"""
137137

138138
endpoints = HPJumpStartEndpoint.model_construct().list(namespace)
@@ -174,7 +174,7 @@ def custom_list(
174174
namespace: Optional[str],
175175
):
176176
"""
177-
List custom model endpoints with provided namespace.
177+
List all Hyperpod custom model endpoints.
178178
"""
179179

180180
endpoints = HPEndpoint.model_construct().list(namespace)
@@ -232,7 +232,7 @@ def js_describe(
232232
full: bool
233233
):
234234
"""
235-
Describe a jumpstart model endpoint with provided name and namespace.
235+
Describe a Hyperpod Jumpstart model endpoint.
236236
"""
237237

238238
my_endpoint = HPJumpStartEndpoint.model_construct().get(name, namespace)
@@ -380,7 +380,7 @@ def custom_describe(
380380
full: bool
381381
):
382382
"""
383-
Describe a custom model endpoint with provided name and namespace.
383+
Describe a Hyperpod custom model endpoint.
384384
"""
385385

386386
my_endpoint = HPEndpoint.model_construct().get(name, namespace)
@@ -553,7 +553,7 @@ def js_delete(
553553
namespace: Optional[str],
554554
):
555555
"""
556-
Delete a jumpstart model endpoint with provided name and namespace.
556+
Delete a Hyperpod Jumpstart model endpoint.
557557
"""
558558
my_endpoint = HPJumpStartEndpoint.model_construct().get(name, namespace)
559559
my_endpoint.delete()
@@ -578,7 +578,7 @@ def custom_delete(
578578
namespace: Optional[str],
579579
):
580580
"""
581-
Delete a custom model endpoint with provided name and namespace.
581+
Delete a Hyperpod custom model endpoint.
582582
"""
583583
my_endpoint = HPEndpoint.model_construct().get(name, namespace)
584584
my_endpoint.delete()
@@ -596,7 +596,7 @@ def js_list_pods(
596596
namespace: Optional[str],
597597
):
598598
"""
599-
Get specific pod log for jumpstart model endpoint.
599+
List all pods related to jumpstart model endpoint.
600600
"""
601601
my_endpoint = HPJumpStartEndpoint.model_construct()
602602
pods = my_endpoint.list_pods(namespace=namespace)
@@ -615,7 +615,7 @@ def custom_list_pods(
615615
namespace: Optional[str],
616616
):
617617
"""
618-
Get specific pod log for custom model endpoint.
618+
List all pods related to custom model endpoint.
619619
"""
620620
my_endpoint = HPEndpoint.model_construct()
621621
pods = my_endpoint.list_pods(namespace=namespace)
@@ -699,7 +699,7 @@ def js_get_operator_logs(
699699
since_hours: float,
700700
):
701701
"""
702-
Get operator logs for jumpstart model endpoint in the set time frame.
702+
Get operator logs for jumpstart model endpoint.
703703
"""
704704
my_endpoint = HPJumpStartEndpoint.model_construct()
705705
logs = my_endpoint.get_operator_logs(since_hours=since_hours)
@@ -717,7 +717,7 @@ def custom_get_operator_logs(
717717
since_hours: float,
718718
):
719719
"""
720-
Get operator logs for custom model endpoint in the set time frame.
720+
Get operator logs for custom model endpoint.
721721
"""
722722
my_endpoint = HPEndpoint.model_construct()
723723
logs = my_endpoint.get_operator_logs(since_hours=since_hours)

src/sagemaker/hyperpod/cli/commands/training.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
registry=SCHEMA_REGISTRY,
2323
)
2424
def pytorch_create(version, debug, config):
25-
"""Create a PyTorch job"""
25+
"""Create a PyTorch job."""
2626
try:
2727
click.echo(f"Using version: {version}")
2828
job_name = config.get("name")
@@ -64,7 +64,7 @@ def pytorch_create(version, debug, config):
6464
help="Optional. The namespace to list jobs from. Defaults to 'default' namespace.",
6565
)
6666
def list_jobs(namespace: str):
67-
"""List all HyperPod PyTorch jobs"""
67+
"""List all HyperPod PyTorch jobs."""
6868
try:
6969
jobs = HyperPodPytorchJob.list(namespace=namespace)
7070

@@ -144,7 +144,7 @@ def list_jobs(namespace: str):
144144
help="Optional. The namespace of the job. Defaults to 'default' namespace.",
145145
)
146146
def pytorch_describe(job_name: str, namespace: str):
147-
"""Describe a HyperPod PyTorch job"""
147+
"""Describe a HyperPod PyTorch job."""
148148
try:
149149
job = HyperPodPytorchJob.get(name=job_name, namespace=namespace)
150150

@@ -245,7 +245,7 @@ def pytorch_describe(job_name: str, namespace: str):
245245
help="Optional. The namespace of the job. Defaults to 'default' namespace.",
246246
)
247247
def pytorch_delete(job_name: str, namespace: str):
248-
"""Delete a HyperPod PyTorch job"""
248+
"""Delete a HyperPod PyTorch job."""
249249
try:
250250
job = HyperPodPytorchJob.get(name=job_name, namespace=namespace)
251251
job.delete()
@@ -270,7 +270,7 @@ def pytorch_delete(job_name: str, namespace: str):
270270
help="Optional. The namespace of the job. Defaults to 'default' namespace.",
271271
)
272272
def pytorch_list_pods(job_name: str, namespace: str):
273-
"""List all HyperPod PyTorch pods corresponding to the job"""
273+
"""List all HyperPod PyTorch pods related to the job."""
274274
try:
275275
job = HyperPodPytorchJob.get(name=job_name, namespace=namespace)
276276
pods = job.list_pods()
@@ -316,7 +316,7 @@ def pytorch_list_pods(job_name: str, namespace: str):
316316
help="Optional. The namespace of the job. Defaults to 'default' namespace.",
317317
)
318318
def pytorch_get_logs(job_name: str, pod_name: str, namespace: str):
319-
"""Get specific logs from pod corresponding to the job"""
319+
"""Get specific pod log for Hyperpod Pytorch job."""
320320
try:
321321
click.echo("Listing logs for pod: " + pod_name)
322322
job = HyperPodPytorchJob.get(name=job_name, namespace=namespace)

src/sagemaker/hyperpod/cli/hyp_cli.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,49 +46,49 @@ class CLICommand(click.Group):
4646

4747
@cli.group(cls=CLICommand)
4848
def create():
49-
"""Create a jumpstart model endpoint, a custom model endpoint, or a pytorch job."""
49+
"""Create endpoints or pytorch jobs."""
5050
pass
5151

5252

5353
@cli.group(cls=CLICommand)
5454
def list():
55-
"""List all jumpstart model endpoints, custom model endpoints, or pytorch jobs."""
55+
"""List endpoints or pytorch jobs."""
5656
pass
5757

5858

5959
@cli.group(cls=CLICommand)
6060
def describe():
61-
"""Describe a jumpstart model endpoint, a custom model endpoint, or a pytorch job."""
61+
"""Describe endpoints or pytorch jobs."""
6262
pass
6363

6464

6565
@cli.group(cls=CLICommand)
6666
def delete():
67-
"""Delete a jumpstart model endpoint, a custom model endpoint, or a pytorch job."""
67+
"""Delete endpoints or pytorch jobs."""
6868
pass
6969

7070

7171
@cli.group(cls=CLICommand)
7272
def list_pods():
73-
"""List all pods for jumpstart model endpoint, custom model endpoint or pytorch jobs."""
73+
"""List pods for endpoints or pytorch jobs."""
7474
pass
7575

7676

7777
@cli.group(cls=CLICommand)
7878
def get_logs():
79-
"""Get specific pod logs for a jumpstart model endpoint, custom model endpoint or pytorch job."""
79+
"""Get pod logs for endpoints or pytorch jobs."""
8080
pass
8181

8282

8383
@cli.group(cls=CLICommand)
8484
def invoke():
85-
"""Invoke a jumpstart model endpoint or a custom model endpoint."""
85+
"""Invoke model endpoints."""
8686
pass
8787

8888

8989
@cli.group(cls=CLICommand)
9090
def get_operator_logs():
91-
"""Get operator logs for jumpstart model endpoint, or custom model endpoint."""
91+
"""Get operator logs for endpoints."""
9292
pass
9393

9494

0 commit comments

Comments
 (0)