class_docstr: Configuration object used to store configurable parameters for CrypTen.
  
  This object acts as a nested dictionary, but can be queried using dot-notation(
  e.g. querying or setting `cfg.a.b` is equivalent to `cfg['a']['b']`).
  
  Users can load a CrypTen config from a file using `cfg.load_config(filepath)`.
  
  Users can temporarily override a config parameter using the contextmanager temp_override:
  
      .. code-block:: python
  
      cfg.a.b = outer     # sets cfg["a"]["b"] to outer value
  
      with cfg.temp_override("a.b", inner):
          print(cfg.a.b)  # prints inner value
  
      print(cfg.a.b)  # prints outer value
class_docstr_tok: ["Configuration","object","used","to","store","configurable","parameters","for","CrypTen",".","This","object","acts","as","a","nested","dictionary",",","but","can","be","queried","using","dot-notation","(","e.g",".","querying","or","setting","`","cfg.a.b","`","is","equivalent","to","`","cfg","[","'","a","'","]","[","'","b","'","]","`",")",".","Users","can","load","a","CrypTen","config","from","a","file","using","`","cfg.load_config","(","filepath",")","`",".","Users","can","temporarily","override","a","config","parameter","using","the","contextmanager","temp_override",":","..","code-block",":",":","python","cfg.a.b","=","outer","#","sets","cfg","[","``","a","''","]","[","``","b","''","]","to","outer","value","with","cfg.temp_override","(","``","a.b","''",",","inner",")",":","print","(","cfg.a.b",")","#","prints","inner","value","print","(","cfg.a.b",")","#","prints","outer","value"]
docstr: Loads config from a yaml file
docstr_tok: ["Loads","config","from","a","yaml","file"]
code: def load_config(self, config_file):
      """Loads config from a yaml file"""
      if config_file is None:
          config_file = CrypTenConfig.__DEFAULT_CONFIG_PATH
  
      # Use yaml to open stream for safe load
      with open(config_file) as stream:
          config_dict = yaml.safe_load(stream)
      self.config = OmegaConf.create(config_dict)
  
file_path: CrypTen/crypten/config/config.py
imports: import os
  from contextlib import contextmanager
  import yaml
  from omegaconf import OmegaConf
label_desc: Use image node_id 2 for calling the CrypTenConfig obj's underlying member method code with example usage: obj.load_config(config_file) without return types