class_docstr: Tests for randomized cleaner.
class_docstr_tok: ["Tests","for","randomized","cleaner","."]
docstr: Test that triples in a test set can get moved properly to the training set.
docstr_tok: ["Test","that","triples","in","a","test","set","can","get","moved","properly","to","the","training","set","."]
code: def test_manual(self):
      """Test that triples in a test set can get moved properly to the training set."""
      training = torch.as_tensor(
          data=[
              [1, 1000, 2],
              [1, 1000, 3],
          ],
          dtype=torch.long,
      )
      testing = torch.as_tensor(
          data=[
              [2, 1000, 3],
              [1, 1000, 4],
              [2, 1000, 4],
              [1, 1001, 3],
          ],
          dtype=torch.long,
      )
      expected_training_1 = {
          (1, 1000, 2),
          (1, 1000, 3),
          (1, 1000, 4),
          (1, 1001, 3),
      }
      expected_testing_1 = {
          (2, 1000, 3),
          (2, 1000, 4),
      }
  
      expected_training_2 = {
          (1, 1000, 2),
          (1, 1000, 3),
          (2, 1000, 4),
          (1, 1001, 3),
      }
      expected_testing_2 = {
          (2, 1000, 3),
          (1, 1000, 4),
      }
  
      new_training, new_testing = [
          triple_tensor_to_set(arr)
          for arr in self.instance.cleanup_pair(
              training, testing, random_state=None
          )
      ]
  
      if expected_training_1 == new_training:
          self.assertEqual(expected_testing_1, new_testing)
      elif expected_training_2 == new_training:
          self.assertEqual(expected_testing_2, new_testing)
      else:
          self.fail("training was not correct")
  
imports: import numpy
  import pytest
  import torch
  from pykeen.triples.splitting import CleanupSplitter, CoverageSplitter, DeterministicCleaner, RandomizedCleaner, _get_cover_deterministic, get_absolute_split_sizes, normalize_ratios
  from pykeen.triples.utils import get_entities, get_relations
  from pykeen.utils import triple_tensor_to_set
  from tests.cases import CleanerTestCase, SplitterTestCase
label_desc: Use image node_id 1 for calling the RandomizedCleanerTests obj's underlying member method code with example usage: obj.test_manual() without return types