    def __init__(self, serialization_dir: str, model: Model) -> None:
        """
        A trivial trainer to assist in making model archives for models that do not actually
        require training. For instance, a majority class baseline.

        In a typical AllenNLP configuration file, neither the `serialization_dir` nor the `model`
        arguments would need an entry.
        """

        super().__init__(serialization_dir, cuda_device=-1)
        self.model = model
        self._best_model_filename: Optional[str] = None
A trivial trainer to assist in making model archives for models that do not actually
require training. For instance, a majority class baseline.

In a typical AllenNLP configuration file, neither the `serialization_dir` nor the `model`
arguments would need an entry.
allennlp/training/no_op_trainer.py