@@ -122,6 +122,7 @@ def __init__(
122122 accept_type = None ,
123123 content_type = None ,
124124 content_template = None ,
125+ custom_attributes = None ,
125126 ):
126127 """Initializes a configuration of a model and the endpoint to be created for it.
127128
@@ -141,6 +142,15 @@ def __init__(
141142 "application/jsonlines". The template should have one and only one placeholder
142143 $features which will be replaced by a features list for to form the model inference
143144 input.
145+ custom_attributes (str): Provides additional information about a request for an
146+ inference submitted to a model hosted at an Amazon SageMaker endpoint. The
147+ information is an opaque value that is forwarded verbatim. You could use this
148+ value, for example, to provide an ID that you can use to track a request or to
149+ provide other metadata that a service endpoint was programmed to process. The value
150+ must consist of no more than 1024 visible US-ASCII characters as specified in
151+ Section 3.3.6. Field Value Components (
152+ https://tools.ietf.org/html/rfc7230#section-3.2.6) of the Hypertext Transfer
153+ Protocol (HTTP/1.1).
144154 """
145155 self .predictor_config = {
146156 "model_name" : model_name ,
@@ -169,6 +179,9 @@ def __init__(
169179 )
170180 self .predictor_config ["content_template" ] = content_template
171181
182+ if custom_attributes is not None :
183+ self .predictor_config ["custom_attributes" ] = custom_attributes
184+
172185 def get_predictor_config (self ):
173186 """Returns part of the predictor dictionary of the analysis config."""
174187 return copy .deepcopy (self .predictor_config )
0 commit comments