@@ -327,15 +327,17 @@ def describe(self):
327327
328328class _LocalEndpointConfig (object ):
329329
330- def __init__ (self , config_name , production_variants ):
330+ def __init__ (self , config_name , production_variants , tags = None ):
331331 self .name = config_name
332332 self .production_variants = production_variants
333+ self .tags = tags
333334 self .creation_time = datetime .datetime .now ()
334335
335336 def describe (self ):
336337 response = {
337338 'EndpointConfigName' : self .name ,
338339 'EndpointConfigArn' : _UNUSED_ARN ,
340+ 'Tags' : self .tags ,
339341 'CreationTime' : self .creation_time ,
340342 'ProductionVariants' : self .production_variants
341343 }
@@ -348,7 +350,7 @@ class _LocalEndpoint(object):
348350 _IN_SERVICE = 'InService'
349351 _FAILED = 'Failed'
350352
351- def __init__ (self , endpoint_name , endpoint_config_name , local_session = None ):
353+ def __init__ (self , endpoint_name , endpoint_config_name , tags = None , local_session = None ):
352354 # runtime import since there is a cyclic dependency between entities and local_session
353355 from sagemaker .local import LocalSession
354356 self .local_session = local_session or LocalSession ()
@@ -357,6 +359,7 @@ def __init__(self, endpoint_name, endpoint_config_name, local_session=None):
357359 self .name = endpoint_name
358360 self .endpoint_config = local_client .describe_endpoint_config (endpoint_config_name )
359361 self .production_variant = self .endpoint_config ['ProductionVariants' ][0 ]
362+ self .tags = tags
360363
361364 model_name = self .production_variant ['ModelName' ]
362365 self .primary_container = local_client .describe_model (model_name )['PrimaryContainer' ]
@@ -392,6 +395,7 @@ def describe(self):
392395 'EndpointConfigName' : self .endpoint_config ['EndpointConfigName' ],
393396 'CreationTime' : self .create_time ,
394397 'ProductionVariants' : self .endpoint_config ['ProductionVariants' ],
398+ 'Tags' : self .tags ,
395399 'EndpointName' : self .name ,
396400 'EndpointArn' : _UNUSED_ARN ,
397401 'EndpointStatus' : self .state
0 commit comments