when loading the Lag-Llama checkpoint it will contains custom GluonTS classes and PyTorch blocks loading those classes. Its necessary to explicitly allow it to load them, running this before running the function will solve it :
from torch.serialization import add_safe_globals
from gluonts.torch.modules.loss import NegativeLogLikelihood
from gluonts.torch.distributions.studentT import StudentTOutput
add_safe_globals([StudentTOutput, NegativeLogLikelihood])
when loading the Lag-Llama checkpoint it will contains custom GluonTS classes and PyTorch blocks loading those classes. Its necessary to explicitly allow it to load them, running this before running the function will solve it :
from torch.serialization import add_safe_globals
from gluonts.torch.modules.loss import NegativeLogLikelihood
from gluonts.torch.distributions.studentT import StudentTOutput
add_safe_globals([StudentTOutput, NegativeLogLikelihood])