Skip to content

Commit 0ca9c32

Browse files
author
Jonathan Esterhazy
committed
make some local mode invoke_endpoint arguments optional
1 parent 5980332 commit 0ca9c32

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/sagemaker/local/local_session.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ def __init__(self, config=None):
165165
self.serving_port = get_config_value('local.serving_port', config) or 8080
166166

167167
def invoke_endpoint(self, Body, EndpointName, # pylint: disable=unused-argument
168-
ContentType, Accept, CustomAttributes):
168+
ContentType=None, Accept=None, CustomAttributes=None):
169169
url = "http://localhost:%s/invocations" % self.serving_port
170-
headers = {
171-
'Content-type': ContentType
172-
}
170+
headers = {}
171+
172+
if ContentType is not None:
173+
headers['Content-type'] = ContentType
173174

174175
if Accept is not None:
175176
headers['Accept'] = Accept

0 commit comments

Comments
 (0)