Skip to content

Commit a9e8d59

Browse files
authored
is_kubeconfig_loaded Fix (#139)
* Test PR * Fix is_kubeconfig_loaded Class attribute bug
1 parent 2683932 commit a9e8d59

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/sagemaker/hyperpod/training/hyperpod_pytorch_job.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
)
88
from sagemaker.hyperpod.common.config.metadata import Metadata
99
from kubernetes import client, config
10-
from typing import List, Optional
10+
from typing import List, Optional, ClassVar
1111
from sagemaker.hyperpod.common.utils import (
1212
handle_exception,
1313
get_default_namespace,
@@ -23,6 +23,8 @@
2323

2424

2525
class HyperPodPytorchJob(_HyperPodPytorchJob):
26+
is_kubeconfig_loaded: ClassVar[bool] = False
27+
2628
model_config = ConfigDict(extra="forbid")
2729

2830
metadata: Metadata = Field(
@@ -33,10 +35,6 @@ class HyperPodPytorchJob(_HyperPodPytorchJob):
3335
default=None, description="The status of the HyperPodPytorchJob"
3436
)
3537

36-
is_kubeconfig_loaded: bool = Field(
37-
default=False
38-
)
39-
4038
@classmethod
4139
def verify_kube_config(cls):
4240
if not cls.is_kubeconfig_loaded:

test/unit_tests/cli/test_inference.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import hyperpod_custom_inference_template.registry as creg
1616

1717
# --------- JumpStart Commands ---------
18-
1918
@patch('sagemaker.hyperpod.cli.inference_utils.load_schema_for_version')
2019
@patch('sagemaker.hyperpod.cli.commands.inference.HPJumpStartEndpoint')
2120
def test_js_create_with_required_args(mock_endpoint_class, mock_load_schema):

0 commit comments

Comments
 (0)