class_docstr: This class tests all member functions of crypten package
class_docstr_tok: ["This","class","tests","all","member","functions","of","crypten","package"]
docstr: Tests that user-supplied seeds replaces auto-generated seeds
  and tests that the seed values match the expected values
code: def test_manual_seeds(self):
      """
      Tests that user-supplied seeds replaces auto-generated seeds
      and tests that the seed values match the expected values
      """
  
      # Store auto-generated seeds
      orig_seeds = defaultdict(dict)
      seed_names = ["prev", "next", "local", "global"]
      for seed_name in seed_names:
          for device in crypten.generators[seed_name].keys():
              orig_seeds[seed_name][device] = crypten.generators[
                  seed_name
              ][device].initial_seed()
  
      # User-generated seeds
      next_seed = random.randint(0, 2**63 - 1)
      local_seed = random.randint(0, 2**63 - 1)
      global_seed = random.randint(0, 2**63 - 1)
  
      # Store expected seeds
      expected_seeds = {}
      expected_seeds["next"] = next_seed
      expected_seeds["local"] = local_seed
  
      # Set user-generated seeds in crypten
      cfg.debug.debug_mode = True
      crypten.manual_seed(next_seed, local_seed, global_seed)
  
      # Check that user-generated seeds are not equal to the auto-generated ones
      for seed_name in seed_names:
          for device in crypten.generators[seed_name].keys():
              self.assertNotEqual(
                  crypten.generators[seed_name][device].initial_seed(),
                  orig_seeds[seed_name][device],
              )
  
              # Check if seeds match the expected seeds
              if seed_name in expected_seeds.keys():
                  self.assertEqual(
                      crypten.generators[seed_name][
                          device
                      ].initial_seed(),
                      expected_seeds[seed_name],
                  )
  
      # Run the tests to validate prev and global are intialized correctly
      self.test_przs_generators()
      self.test_global_generator()
  
imports: import itertools
  import logging
  import math
  import random
  import unittest
  from collections import defaultdict
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common import serial
  from crypten.common.tensor_types import is_float_tensor
  from crypten.config import cfg
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
  from torch import nn
label_desc: Use image node_id 5 for calling the TestCrypten obj's underlying member method code with example usage: obj.test_manual_seeds() without return types