Skip to content

Commit f8e49f4

Browse files
author
Mohamed Zeidan
committed
changed endpoint name from value user has to manually insert to placeholder value
1 parent 6553766 commit f8e49f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/sagemaker/hyperpod/inference/jumpstart_public_hub_visualization_utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ def _generate_deployment_config(self, model_id):
217217
instance_type = default_type if default_type else '\<ENTER-INSTANCE-TYPE\>'
218218
types_comment = self._format_instance_types_comment(supported_types)
219219

220+
# Generate timestamp for unique endpoint name
221+
timestamp = str(int(time.time()))
222+
endpoint_name_value = f"{model_id}-{timestamp}"
223+
220224
config_code = f'''# Deployment configuration for {model_id}
221225
from sagemaker.hyperpod.inference.config.hp_jumpstart_endpoint_config import (
222226
Model, Server, SageMakerEndpoint
@@ -225,14 +229,14 @@ def _generate_deployment_config(self, model_id):
225229
226230
{types_comment}
227231
228-
# Create configs - REPLACE PLACEHOLDER VALUE BELOW
232+
# Create configs
229233
model = Model(
230234
model_id='{model_id}',
231235
)
232236
server = Server(
233237
instance_type='{instance_type}',
234238
)
235-
endpoint_name = SageMakerEndpoint(name='ENTER-YOUR-ENDPOINT-NAME')
239+
endpoint_name = SageMakerEndpoint(name='{endpoint_name_value}')
236240
237241
# Create endpoint spec
238242
js_endpoint = HPJumpStartEndpoint(

0 commit comments

Comments
 (0)