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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from sagemaker.hyperpod.inference.config.hp_jumpstart_endpoint_config import (
Model,
SageMakerEndpoint,
Server
Server,
TlsConfig
)
from sagemaker.hyperpod.inference.hp_jumpstart_endpoint import HPJumpStartEndpoint

Expand Down Expand Up @@ -86,8 +87,12 @@ def to_domain(self) -> HPJumpStartEndpoint:
instance_type=self.instance_type,
)
sage_ep = SageMakerEndpoint(name=self.endpoint_name)
tls = (
TlsConfig(tls_certificate_output_s3_uri=self.tls_certificate_output_s3_uri)
)
return HPJumpStartEndpoint(
model=model,
server=server,
sage_maker_endpoint=sage_ep,
tls_config=tls
)
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
}
],
"default": null,
"description": "S3 URI to write the TLS certificate (optional)",
"description": "S3 URI to write the TLS certificate",
"title": "Tls Certificate Output S3 Uri"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

class VolumeConfig(BaseModel):
model_config = ConfigDict(extra="forbid")

name: str = Field(
...,
description="Volume name",
Expand All @@ -38,7 +37,7 @@ class VolumeConfig(BaseModel):
description="PVC claim name (required for pvc volumes)",
min_length=1
)
read_only: Optional[bool] = Field(None, description="Read-only flag for pvc volumes")
read_only: Optional[Literal['true', 'false']] = Field(None, description="Read-only flag for pvc volumes")

@field_validator('mount_path', 'path')
@classmethod
Expand Down Expand Up @@ -108,10 +107,11 @@ class PyTorchJobConfig(BaseModel):
description="Number of nodes",
ge=1
)
tasks_per_node: Optional[str] = Field(
default="auto",
tasks_per_node: Optional[int] = Field(
default=None,
alias="tasks_per_node",
description="Number of workers per node; supported values: [auto,cpu, gpu, int]",
description="Number of tasks per node",
ge=1
)
label_selector: Optional[Dict[str, str]] = Field(
default=None,
Expand Down Expand Up @@ -282,7 +282,7 @@ def to_domain(self) -> Dict:
elif vol.type == "pvc":
pvc_config = PersistentVolumeClaim(
claim_name=vol.claim_name,
read_only=vol.read_only if vol.read_only is not None else False
read_only=vol.read_only == "true" if vol.read_only else False
)
volume_obj = Volumes(name=vol.name, persistent_volume_claim=pvc_config)
volumes.append(volume_obj)
Expand Down Expand Up @@ -357,4 +357,4 @@ def to_domain(self) -> Dict:
"labels": metadata_labels,
"spec": job_kwargs,
}
return result
return result
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
"read_only": {
"anyOf": [
{
"type": "boolean"
"enum": [
"true",
"false"
],
"type": "string"
},
{
"type": "null"
Expand Down Expand Up @@ -197,14 +201,15 @@
"tasks_per_node": {
"anyOf": [
{
"type": "string"
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": "auto",
"description": "Number of workers per node; supported values: [auto,cpu, gpu, int]",
"default": null,
"description": "Number of tasks per node",
"title": "Tasks Per Node"
},
"label_selector": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PyTorchJobConfig(BaseModel):
min_length=1
)
node_count: Optional[int] = Field(
default=None,
default=1,
alias="node_count",
description="Number of nodes",
ge=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"type": "null"
}
],
"default": null,
"default": 1,
"description": "Number of nodes",
"title": "Node Count"
},
Expand Down
Loading