From b9d1575388c45fedd69b4e48c157cfb7f4b03aa9 Mon Sep 17 00:00:00 2001 From: Liangfu Chen Date: Mon, 20 Mar 2023 22:18:33 -0700 Subject: [PATCH] [multimodal] support optimize for inference --- src/autogluon/cloud/scripts/multimodal_serve.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/autogluon/cloud/scripts/multimodal_serve.py b/src/autogluon/cloud/scripts/multimodal_serve.py index 0990f7f..6bc4f37 100644 --- a/src/autogluon/cloud/scripts/multimodal_serve.py +++ b/src/autogluon/cloud/scripts/multimodal_serve.py @@ -27,6 +27,9 @@ def model_fn(model_dir): column_types.pop(label_column) globals()["column_names"] = list(column_types.keys()) + if hasattr(model, "optimize_for_inference"): + model.optimize_for_inference() + return model