File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
scripts/sagemaker_scripts Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -181,15 +181,15 @@ def predict_real_time(
181181 self .id_column = id_column or self .id_column
182182 self .timestamp_column = timestamp_column or self .timestamp_column
183183 self .target_column = target or self .target_column
184-
184+
185185 return self .backend .predict_real_time (
186186 test_data = test_data ,
187187 id_column = self .id_column ,
188188 timestamp_column = self .timestamp_column ,
189189 target = self .target_column ,
190190 static_features = static_features ,
191191 accept = accept ,
192- inference_kwargs = kwargs
192+ inference_kwargs = kwargs ,
193193 )
194194
195195 def predict_proba_real_time (self , ** kwargs ) -> pd .DataFrame :
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ def _save_image_and_update_dataframe_column(bytes):
3333
3434 return im_path
3535
36+
3637def _custom_json_deserializer (serialized_str ):
3738 """
3839 Deserialize the JSON string that may include representations of complex data types like DataFrames
@@ -55,6 +56,7 @@ def _custom_json_deserializer(serialized_str):
5556
5657 return deserialized_kwargs
5758
59+
5860def model_fn (model_dir ):
5961 """loads model from previously saved artifact"""
6062 logger .info ("Loading the model" )
Original file line number Diff line number Diff line change 11# flake8: noqa
2+ import logging
23import os
34import pickle
45import shutil
6+ import sys
57from io import BytesIO , StringIO
68
79import pandas as pd
8- import logging
9- import sys
1010
1111from autogluon .timeseries import TimeSeriesDataFrame , TimeSeriesPredictor
12+
1213logging .basicConfig (stream = sys .stdout , level = logging .INFO )
1314logger = logging .getLogger (__name__ )
1415
16+
1517def model_fn (model_dir ):
1618 """loads model from previously saved artifact"""
1719 # TSPredictor will write to the model file during inference while the default model_dir is read only
You can’t perform that action at this time.
0 commit comments