Function load_config

Synopsis

def load_config(path)

Description

Loads the config from file

Source

Lines 105-115 in anyfig/figutils.py.

def load_config(path):
  ''' Loads the config from file '''
  path = Path(path)
  with open(path, 'rb') as f:
    config = dill.load(f)

  err_msg = f"'{type(config)}' isn't a registered config class. Import the config class's file to register it"
  assert is_config_class(type(config)), err_msg
  return config







Add Discussion as Guest

Log in