Skip to content

CH04 - get_llama_predictions breaks #3

@DiogoParreira

Description

@DiogoParreira

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])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions