class_docstr: Test early stopping on a real-world use case of training TransE with Adam.
class_docstr_tok: ["Test","early","stopping","on","a","real-world","use","case","of","training","TransE","with","Adam","."]
docstr: Set up the real world early stopping test.
docstr_tok: ["Set","up","the","real","world","early","stopping","test","."]
code: def setUp(self) -> None:
      """Set up the real world early stopping test."""
      # Fix seed for reproducibility
      torch.manual_seed(seed=self.seed)
      numpy.random.seed(seed=self.seed)
  
imports: import unittest
  from typing import List
  import numpy
  import pytest
  import torch
  import unittest_templates
  from torch.optim import Adam
  from pykeen.datasets import Nations
  from pykeen.evaluation import RankBasedEvaluator
  from pykeen.models import Model, TransE
  from pykeen.stoppers.early_stopping import EarlyStopper, EarlyStoppingLogic, is_improvement
  from pykeen.training import SLCWATrainingLoop
  from tests import cases
label_desc: Use image node_id 1 for calling the TestEarlyStopperRealWorld obj's underlying member method code with example usage: obj.setUp() without return types