When using nhits and making predictions my outputs...
# neural-forecast
j
When using nhits and making predictions my outputs blow up with the infomation of making predicitons: Predictiing dataloader. As I make predictions for a full year based on earlier trained model. Is there a way to have no output when doing the predictions
m
Thanks so much for using NF! Could you please share some code, screenshots and errors you are seeing? In that way we can help you better.
j
@Jelte Bottema I had this issue today as well, it comes from the trainer kwargs passed into BaseModel: https://github.com/Nixtla/neuralforecast/blob/main/neuralforecast/common/_base_model.py#L88-L123 which are then passed into
pl.Trainer
, so if when you create the model you pass in
enable_progress_bar=False
it should eliminate this logging. If you're loading in a model you can do this:
Copy code
nf.models[0].trainer_kwargs['enable_progress_bar'] = False
if you want to reduce the logger noise elsewhere do:
Copy code
logging.getLogger("pytorch_lightning").setLevel(logging.ERROR)
logging.getLogger("lightning.pytorch.utilities.rank_zero").setLevel(logging.ERROR)
I'm also trying to do many predictions, but the library only allows you to do one at a time. If I make progress on that to reduce noise, I'll post about it here
j
Thanks for the reply I will try to make it work
which model are you using? I get the error: AttributeError: 'AutoNHITS' object has no attribute 'trainer_kwargs' So maybe this is not possible for AutoNhits?
j
I did it with AutoNBEATSx, I'd suggest stepping through with a debugger
j
then it should work I guess, thanks again for the info, will try to get it working
j
I think it might only work if you have loaded the model from disk. It might work if you modify the
trainer
attribute directly