title: Setting the same seed for torch, random number and numpy throughout all the modules
body: <p>I am trying to set the same seed throughout all the project.
  Below are the parameters I am setting in my main file, in which all other modules will be imported -</p>
  <pre><code>seed = 42
  os.environ['PYTHONHASHSEED'] = str(seed)
  # Torch RNG
  torch.manual_seed(seed)
  torch.cuda.manual_seed(seed)
  torch.cuda.manual_seed_all(seed)
  # Python RNG
  np.random.seed(seed)
  random.seed(seed)
  </code></pre>
  <p>My project directory looks like below -</p>
  <pre><code>├── Combined_Files_without_label5.csv
  ├── __pycache__
  │   ├── dataset.cpython-37.pyc
  │   ├── datasets.cpython-37.pyc
  │   └── testing.cpython-37.pyc
  ├── datasets.py
  ├── import_packages
  │   ├── __init__.py
  │   ├── __pycache__
  │   │   ├── __init__.cpython-37.pyc
  │   │   ├── dataset.cpython-37.pyc
  │   │   ├── dataset_class.cpython-37.pyc
  │   │   ├── dataset_partition.cpython-37.pyc
  │   │   └── visualising.cpython-37.pyc
  │   ├── dataset_class.py
  │   ├── dataset_partition.py
  │   └── visualising.py
  ├── main.py
  </code></pre>
  <p>Now, the problem is I am importing the module from <code>dataset_partition.py</code> and the function  needs a <code>seed</code> value there. e.g -</p>
  <pre><code>    df_train, df_temp, y_train, y_temp = train_test_split(X,
                                                        y,
                                                        stratify=y,
                                                        test_size=(1.0 - frac_train), # noqa
                                                        random_state=seed) 
  </code></pre>
  <p>Now, my questions are,<br> 1)If I just remove the <code>random_state</code> parameter from the above statement so will it take the seed from my main file?<br> If not, then how to set it? <br>
  2)Does all the other function which requires seed like <code>torch.manual.seed</code>, <code>torch.cuda.manual_seed(seed)</code> will behave in the same way?(If not, then how to resolve it)</p>