How to access CustomAttributes in async inferece request input_fn
dcdieci opened this issue · 1 comments
I need to access CustomAttributes in async request.
I tried to access it inside a custom input_fn
def input_fn(self, input_data, content_type):
self.context coud give access to custom properties
but I am not sure about this
try:
if not self.initialized:
self.initialize(context)
(I am new to python). But this looks like it would instantiate the class once and fill the context once, so it would not get update on each request with the additional context params i guess?!
anyhow. it looks like self
will not be accessible inside
def input_fn(self, input_data, content_type):
hence no access to additional params.
@philschmid Any idea about how to access additional CustomAttributes ?
ideally the context will be passed on a per request base
processed_data = self.preprocess(input_data, content_type, context)