Open nathanielrindlaub opened 3 years ago
I think you can refer two these two links: https://github.com/aws/sagemaker-tensorflow-serving-container/blob/2921d8a46c60687ce9dc29755d683ecd6f4fba4d/docker/build_artifacts/sagemaker/python_service.py#L243, https://github.com/aws/sagemaker-tensorflow-serving-container/blob/2921d8a46c60687ce9dc29755d683ecd6f4fba4d/docker/build_artifacts/sagemaker/tfs_utils.py#L39 Context is created by python_service.py.
What did you find confusing? Please describe. I am trying to make use of the
model_name
attribute in theContext
object that gets passed into my input handler, which the documentation indicates is created by the Python service, but the docs do not indicate where those attribute values come from or how to set them when deploying a model endpoint. In my case, I getContext
object with very little useful information, and it would be helpful to know how to set those values. Here's what myContext
looks like printed out when a request comes in:I've tried a bunch of things (setting the
name
parameter when creating the Model, setting theendpoint_name
param when callingmodel.deploy()
, passingenv: {'SAGEMAKER_TFS_DEFAULT_MODEL_NAME': '<model-name>'}
into the Model as described in this gist) to no avail.Describe how documentation can be improved A little more guidance on how to manipulate and use the
Context
object would be awesome.Additional context Note: my endpoints are single-model endpoints, not multi-model endpoints. Not sure if that is relevant or not.