Add Triton support for variable length requests, adds support for HuggingFace Transformers

Add triton_grpc_compression=False (default) for grpc connection compression control
This commit is contained in:
allegroai
2022-09-02 23:41:49 +03:00
parent c6c40c9a36
commit f4eed33f10
7 changed files with 297 additions and 138 deletions

View File

@@ -22,7 +22,7 @@ class Preprocess(object):
local_file = StorageManager.get_local_copy(remote_url=url)
image = Image.open(local_file)
image = ImageOps.grayscale(image).resize((28, 28))
return np.array(image).flatten()
return np.array([np.array(image)])
def postprocess(self, data: Any, state: dict, collect_custom_statistics_fn=None) -> dict:
# post process the data returned from the model inference engine