Skip to content

Commit 28424e4

Browse files
pintaoz-awspintaoz
andauthored
Update logging information for submitting and deleting training job (#189)
Co-authored-by: pintaoz <[email protected]>
1 parent dcbc8fb commit 28424e4

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
import click
2-
import logging
3-
import os
4-
import yaml
5-
import shutil
6-
import subprocess
7-
from pathlib import Path
82
from sagemaker.hyperpod.training.hyperpod_pytorch_job import HyperPodPytorchJob
93
from sagemaker.hyperpod.common.config import Metadata
10-
import tempfile
11-
from typing import List, Dict, Any, Optional, Callable, get_args, get_origin, Literal
124
from sagemaker.hyperpod.cli.training_utils import generate_click_command
13-
from importlib.metadata import entry_points
145
from hyperpod_pytorch_job_template.registry import SCHEMA_REGISTRY
156
from sagemaker.hyperpod.common.telemetry.telemetry_logging import (
167
_hyperpod_telemetry_emitter,

src/sagemaker/hyperpod/training/hyperpod_pytorch_job.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
_HyperPodPytorchJob, HyperPodPytorchJobStatus
44
)
55
from sagemaker.hyperpod.common.config.metadata import Metadata
6-
from kubernetes import client, config, __version__ as kubernetes_client_version
7-
from typing import List, Optional, ClassVar, Tuple
6+
from kubernetes import client, config
7+
from typing import List, Optional, ClassVar
88
from sagemaker.hyperpod.common.utils import (
99
handle_exception,
1010
get_default_namespace,
@@ -84,7 +84,7 @@ def create(self, debug=False):
8484
plural=PLURAL,
8585
body=config,
8686
)
87-
logger.info("Successfully submitted HyperPodPytorchJob!")
87+
logger.info(f"Successfully submitted HyperPodPytorchJob '{self.metadata.name}'!")
8888
except Exception as e:
8989
logger.error(f"Failed to create HyperPodPytorchJob {self.metadata.name}!")
9090
handle_exception(e, self.metadata.name, self.metadata.namespace)
@@ -131,7 +131,7 @@ def delete(self):
131131
plural=PLURAL,
132132
name=self.metadata.name,
133133
)
134-
logger.info(f"Successful deleted HyperPodPytorchJob!")
134+
logger.info(f"Successful deleted HyperPodPytorchJob '{self.metadata.name}'!")
135135
except Exception as e:
136136
logger.error(f"Failed to delete HyperPodPytorchJob {self.metadata.name}!")
137137
handle_exception(e, self.metadata.name, self.metadata.namespace)

0 commit comments

Comments
 (0)