Wen Yao
07/20/2023, 8:22 PMMLForecast
model? I can save the lightbgm under the hood but would lose the other attributes. I want to save the model artifacts and write an inference pipeline for serving?José Morales
07/20/2023, 8:27 PMWen Yao
07/20/2023, 8:29 PMJosé Morales
07/21/2023, 12:24 AMWen Yao
07/21/2023, 7:27 PMJosé Morales
07/26/2023, 12:05 AMdel fcst.features_
and then picklingWen Yao
07/26/2023, 6:13 PMdel(fcst.ts.features_)
, the model size reduces from ~5G to 250MB. I’ll check if loading still works fine. Any possibility its size can be further reduced?José Morales
07/26/2023, 6:20 PMWen Yao
07/26/2023, 6:21 PMlag_features=['lag1', 'lag2', 'lag3', 'lag4', 'lag5', 'lag6', 'lag7', 'lag8', 'lag9', 'lag10', 'lag11', 'lag12', 'lag13', 'lag14', 'lag15', 'lag16', 'lag17', 'lag18', 'lag19', 'lag20', 'lag21', 'lag22', 'lag23', 'lag24', 'lag25', 'lag26', 'lag27', 'lag28', 'lag29', 'lag30', 'lag31', 'lag32', 'lag33', 'lag34', 'lag35', 'lag36', 'lag37', 'lag38', 'lag39', 'lag40', 'lag41', 'lag42', 'lag43', 'lag44', 'lag45', 'lag46', 'lag47', 'lag48', 'lag49', 'lag50', 'lag51', 'lag52', 'lag53', 'lag54', 'lag55', 'lag56', 'lag57', 'lag58', 'lag59', 'lag60']
date_features
with custom functionsJosé Morales
07/26/2023, 6:24 PM<http://fcst.ts.ga|fcst.ts.ga> = fcst.ts.ga.take_from_groups(slice(-60,None))
Wen Yao
07/26/2023, 6:24 PMJosé Morales
07/26/2023, 8:39 PMdel fcst.models_
fcst.models_['LGMBRegressor'].booster_.save_model('model.txt')
Wen Yao
07/26/2023, 8:41 PMfcst.models_['LGMBRegressor'].booster_.save_model('model.txt')
is very small.José Morales
07/26/2023, 8:44 PMWen Yao
07/26/2023, 8:45 PMpredict
needs to be aware of the feature processing in order to make forecast.José Morales
07/26/2023, 8:52 PMWen Yao
07/26/2023, 8:53 PMfcst.models_['LGMBRegressor'].booster_.save_model('model.txt')
?José Morales
07/26/2023, 8:56 PMbst = lgb.Booster(model_file='model.txt')
fcst.models_ = {'LGMBRegressor': bst}
Wen Yao
07/26/2023, 8:59 PMJosé Morales
07/26/2023, 9:02 PMfcst.ts.static_features_
Wen Yao
07/26/2023, 10:44 PMlen(fcst.ts.features)
is 89fcst.ts.static_features.shape
-> 119299José Morales
07/26/2023, 11:50 PMWen Yao
07/28/2023, 10:00 PMJosé Morales
08/01/2023, 12:59 AMfcst.ts.static_features_
attribute. If you have an older version it may be ts.ts.static_features
. That attribute holds the values for the static features for each serie (if you don't have any it stores only the unique ID). The unique id can be used as a static feature if the model can use it, for example LightGBM