@@ -37,7 +37,7 @@ class RealTimePredictor(object):
37
37
38
38
def __init__ (
39
39
self ,
40
- endpoint ,
40
+ endpoint_name ,
41
41
sagemaker_session = None ,
42
42
serializer = None ,
43
43
deserializer = None ,
@@ -53,7 +53,7 @@ def __init__(
53
53
sequence of bytes from the prediction result without any modifications.
54
54
55
55
Args:
56
- endpoint (str): Name of the Amazon SageMaker endpoint to which
56
+ endpoint_name (str): Name of the Amazon SageMaker endpoint to which
57
57
requests are sent.
58
58
sagemaker_session (sagemaker.session.Session): A SageMaker Session
59
59
object, used for SageMaker interactions (default: None). If not
@@ -74,7 +74,7 @@ def __init__(
74
74
accept (str): The invocation's "Accept", overriding any accept from
75
75
the deserializer (default: None).
76
76
"""
77
- self .endpoint = endpoint
77
+ self .endpoint_name = endpoint_name
78
78
self .sagemaker_session = sagemaker_session or Session ()
79
79
self .serializer = serializer
80
80
self .deserializer = deserializer
@@ -137,7 +137,7 @@ def _create_request_args(self, data, initial_args=None, target_model=None, targe
137
137
args = dict (initial_args ) if initial_args else {}
138
138
139
139
if "EndpointName" not in args :
140
- args ["EndpointName" ] = self .endpoint
140
+ args ["EndpointName" ] = self .endpoint_name
141
141
142
142
if self .content_type and "ContentType" not in args :
143
143
args ["ContentType" ] = self .content_type
@@ -175,7 +175,7 @@ def delete_endpoint(self, delete_endpoint_config=True):
175
175
if delete_endpoint_config :
176
176
self ._delete_endpoint_config ()
177
177
178
- self .sagemaker_session .delete_endpoint (self .endpoint )
178
+ self .sagemaker_session .delete_endpoint (self .endpoint_name )
179
179
180
180
def delete_model (self ):
181
181
"""Deletes the Amazon SageMaker models backing this predictor."""
@@ -225,10 +225,10 @@ def update_data_capture_config(self, data_capture_config):
225
225
DataCaptureConfig to update the predictor's endpoint to use.
226
226
"""
227
227
endpoint_desc = self .sagemaker_session .sagemaker_client .describe_endpoint (
228
- EndpointName = self .endpoint
228
+ EndpointName = self .endpoint_name
229
229
)
230
230
231
- new_config_name = name_from_base (base = self .endpoint )
231
+ new_config_name = name_from_base (base = self .endpoint_name )
232
232
233
233
data_capture_config_dict = None
234
234
if data_capture_config is not None :
@@ -241,7 +241,7 @@ def update_data_capture_config(self, data_capture_config):
241
241
)
242
242
243
243
self .sagemaker_session .update_endpoint (
244
- endpoint_name = self .endpoint , endpoint_config_name = new_config_name
244
+ endpoint_name = self .endpoint_name , endpoint_config_name = new_config_name
245
245
)
246
246
247
247
def list_monitors (self ):
@@ -254,10 +254,10 @@ def list_monitors(self):
254
254
255
255
"""
256
256
monitoring_schedules_dict = self .sagemaker_session .list_monitoring_schedules (
257
- endpoint_name = self .endpoint
257
+ endpoint_name = self .endpoint_name
258
258
)
259
259
if len (monitoring_schedules_dict ["MonitoringScheduleSummaries" ]) == 0 :
260
- print ("No monitors found for endpoint. endpoint: {}" .format (self .endpoint ))
260
+ print ("No monitors found for endpoint. endpoint: {}" .format (self .endpoint_name ))
261
261
return []
262
262
263
263
monitors = []
@@ -292,7 +292,7 @@ def list_monitors(self):
292
292
def _get_endpoint_config_name (self ):
293
293
"""Placeholder docstring"""
294
294
endpoint_desc = self .sagemaker_session .sagemaker_client .describe_endpoint (
295
- EndpointName = self .endpoint
295
+ EndpointName = self .endpoint_name
296
296
)
297
297
endpoint_config_name = endpoint_desc ["EndpointConfigName" ]
298
298
return endpoint_config_name
0 commit comments