docstr: " Test makes sure that the second instance created with the same configuration (BUT NOT checkpoint)
  has different weights. 
docstr_tok: ["``","Test","makes","sure","that","the","second","instance","created","with","the","same","configuration","(","BUT","NOT","checkpoint",")","has","different","weights","."]
code: def test_to_from_config_file(self, asr_model):
      """ " Test makes sure that the second instance created with the same configuration (BUT NOT checkpoint)
      has different weights."""
  
      with tempfile.NamedTemporaryFile() as fp:
          yaml_filename = fp.name
          asr_model.to_config_file(path2yaml_file=yaml_filename)
          next_instance = EncDecCTCModel.from_config_file(
              path2yaml_file=yaml_filename
          )
  
          assert isinstance(next_instance, EncDecCTCModel)
  
          assert len(next_instance.decoder.vocabulary) == 28
          assert asr_model.num_weights == next_instance.num_weights
  
          w1 = (
              asr_model.encoder.encoder[0]
              .mconv[0]
              .conv.weight.data.detach()
              .cpu()
              .numpy()
          )
          w2 = (
              next_instance.encoder.encoder[0]
              .mconv[0]
              .conv.weight.data.detach()
              .cpu()
              .numpy()
          )
  
          assert not np.array_equal(w1, w2)
  
file_path: NeMo/tests/core/test_fileio.py
imports: import os
  import tempfile
  import numpy
  import pytest
  import torch
  from omegaconf import DictConfig, OmegaConf
  from nemo.collections.asr.models import EncDecCTCModel
label_desc: Use image node_id 1 for calling the TestFileIO obj's underlying member method code with example usage: obj.test_to_from_config_file(asr_model) without return types