diff --git a/src/autogluon/cloud/predictor/timeseries_cloud_predictor.py b/src/autogluon/cloud/predictor/timeseries_cloud_predictor.py index e50754c..449f7b4 100644 --- a/src/autogluon/cloud/predictor/timeseries_cloud_predictor.py +++ b/src/autogluon/cloud/predictor/timeseries_cloud_predictor.py @@ -181,7 +181,7 @@ def predict_real_time( self.id_column = id_column or self.id_column self.timestamp_column = timestamp_column or self.timestamp_column self.target_column = target or self.target_column - + return self.backend.predict_real_time( test_data=test_data, id_column=self.id_column, @@ -189,7 +189,7 @@ def predict_real_time( target=self.target_column, static_features=static_features, accept=accept, - inference_kwargs=kwargs + inference_kwargs=kwargs, ) def predict_proba_real_time(self, **kwargs) -> pd.DataFrame: diff --git a/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py b/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py index 0db498e..ab97efd 100644 --- a/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py +++ b/src/autogluon/cloud/scripts/sagemaker_scripts/tabular_serve.py @@ -33,6 +33,7 @@ def _save_image_and_update_dataframe_column(bytes): return im_path + def _custom_json_deserializer(serialized_str): """ Deserialize the JSON string that may include representations of complex data types like DataFrames @@ -55,6 +56,7 @@ def _custom_json_deserializer(serialized_str): return deserialized_kwargs + def model_fn(model_dir): """loads model from previously saved artifact""" logger.info("Loading the model") diff --git a/src/autogluon/cloud/scripts/sagemaker_scripts/timeseries_serve.py b/src/autogluon/cloud/scripts/sagemaker_scripts/timeseries_serve.py index cf265e1..b6b912c 100644 --- a/src/autogluon/cloud/scripts/sagemaker_scripts/timeseries_serve.py +++ b/src/autogluon/cloud/scripts/sagemaker_scripts/timeseries_serve.py @@ -1,17 +1,19 @@ # flake8: noqa +import logging import os import pickle import shutil +import sys from io import BytesIO, StringIO import pandas as pd -import logging -import sys from autogluon.timeseries import TimeSeriesDataFrame, TimeSeriesPredictor + logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger(__name__) + def model_fn(model_dir): """loads model from previously saved artifact""" # TSPredictor will write to the model file during inference while the default model_dir is read only