docstr: Saves current instance's configuration to YAML config file. Weights will not be saved.
  Args:
      path2yaml_file: path2yaml_file: path to yaml file where model model configuration will be saved
  
  Returns:
docstr_tok: ["Saves","current","instance","'s","configuration","to","YAML","config","file",".","Weights","will","not","be","saved",".","Args",":","path2yaml_file",":","path2yaml_file",":","path","to","yaml","file","where","model","model","configuration","will","be","saved","Returns",":"]
code: def to_config_file(self, path2yaml_file: str):
      """
      Saves current instance's configuration to YAML config file. Weights will not be saved.
      Args:
          path2yaml_file: path2yaml_file: path to yaml file where model model configuration will be saved
  
      Returns:
      """
      if hasattr(self, "_cfg"):
          self._cfg = maybe_update_config_version(self._cfg)
          with open(path2yaml_file, "w", encoding="utf-8") as fout:
              OmegaConf.save(config=self._cfg, f=fout, resolve=True)
      else:
          raise NotImplementedError()
  
imports: import hashlib
  import inspect
  import traceback
  from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from dataclasses import dataclass, field
  from enum import Enum
  from functools import total_ordering
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Tuple, Union
  import hydra
  import torch
  import wrapt
  from huggingface_hub import HfApi, HfFolder, ModelFilter, hf_hub_download
  from huggingface_hub.hf_api import ModelInfo
  from omegaconf import DictConfig, OmegaConf
  import nemo
  from nemo.core.connectors.save_restore_connector import SaveRestoreConnector
  from nemo.core.neural_types import NeuralType, NeuralTypeComparisonResult
  from nemo.utils import logging
  from nemo.utils.cloud import maybe_download_from_cloud
  from nemo.utils.data_utils import resolve_cache_dir
  from nemo.utils.model_utils import import_class_by_path, maybe_update_config_version
label_desc: Use image node_id 4 for calling the FileIO obj's underlying member method code with example usage: obj.to_config_file(path2yaml_file) without return types