Closed hannahyess closed 3 years ago
Hi @hannahyess! Could you provide a little more information? For example, what version of gluonts/mxnet are you using?
What predictor is giving you trouble? Did you train it out of an estimator? Which one?
If you could attach the serialized predictor (for example, zipping the files that are generated) that would be ideal!
Hi @lostella, i installed this version of gluonts: !pip install --upgrade mxnet==1.6 gluonts. I'm training it on AWS Sagemaker instance of kernel conda_mxnet_p36. The predictor trained is DeepAR estimator.
Hi @lostella, i actually figured out. it is not because of the deserialised model, but because of the inference data format i used that caused issue. Thanks! Closing this issue.
@hannahyess nice! One note: using directly /temp/
as path to serialize a model is not ideal, since the model will be composed of a few different files and directories. It’s better to create a dedicated directory there (or anywhere), or if the location is meant to be temporary then it’s best to use the tempfile
module from Python: https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory
ok! Thanks @lostella
@hannahyess could you please elaborate what caused that error? I am getting slightly different one:
float() argument must be a string or a number, not 'NAType'
However, I don't have any NA
in my dataset!
Issue Description
I saved trained predictor using predictor.serialize(Path("/tmp/")). But after loading it back using predictor = Predictor.deserialize(Path("/tmp/")), it encounters below issue when performing forecasting. Before saving and loading back, the predictos works perfectly fine.
Error message or code output
Environment
(Add as much information about your environment as possible, e.g. dependencies versions.)