From 253a750b2ccf6e9deddcc3b9883425cd6d00e24f Mon Sep 17 00:00:00 2001 From: Weisu Yin Date: Mon, 15 May 2023 15:05:01 -0700 Subject: [PATCH] Persist models (#76) Co-authored-by: Weisu Yin --- src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py b/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py index 78074cd..8fa677c 100644 --- a/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py +++ b/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py @@ -31,6 +31,7 @@ def _save_image_and_update_dataframe_column(bytes): def model_fn(model_dir): """loads model from previously saved artifact""" model = TabularPredictor.load(model_dir) + model.persist_models() globals()["column_names"] = model.feature_metadata_in.get_features() return model