class_docstr: Test models are set in the right mode at the right time.
class_docstr_tok: ["Test","models","are","set","in","the","right","mode","at","the","right","time","."]
docstr: Set up the test case with a triples factory and TransE as an example model.
docstr_tok: ["Set","up","the","test","case","with","a","triples","factory","and","TransE","as","an","example","model","."]
code: def setUp(self) -> None:
      """Set up the test case with a triples factory and TransE as an example model."""
      self.batch_size = 16
      self.embedding_dim = 8
      self.factory = Nations().training
      self.device = resolve_device("cpu")
      self.model = TransE(
          triples_factory=self.factory, embedding_dim=self.embedding_dim
      ).to(self.device)
  
imports: import unittest
  from dataclasses import dataclass
  from typing import Callable
  import torch
  from pykeen.datasets import Nations
  from pykeen.models import FixedModel, Model, TransE
  from pykeen.triples import TriplesFactory
  from pykeen.typing import COLUMN_HEAD, COLUMN_RELATION, COLUMN_TAIL, Target
  from pykeen.utils import extend_batch, resolve_device
label_desc: Use image node_id 1 for calling the TestBaseModel obj's underlying member method code with example usage: obj.setUp() without return types