def make_library(**kwargs):
    """Build and return a ModelManager object and fill the associated model library
    """
    library_yaml = kwargs.pop('library', 'models/library.yaml')
    comp_yaml = kwargs.pop('comp', 'config/binning.yaml')
    basedir = kwargs.pop('basedir', os.path.abspath('.'))

    model_man = kwargs.get('ModelManager', ModelManager(basedir=basedir))

    model_comp_dict = model_man.make_library(library_yaml, library_yaml, comp_yaml)

    return dict(model_comp_dict=model_comp_dict,
                ModelManager=model_man)
def make_library ( ** kwargs ) : library_yaml = kwargs . pop ( 'library' , 'models/library.yaml' ) comp_yaml = kwargs . pop ( 'comp' , 'config/binning.yaml' ) basedir = kwargs . pop ( 'basedir' , os . path . abspath ( '.' ) ) model_man = kwargs . get ( 'ModelManager' , ModelManager ( basedir = basedir ) ) model_comp_dict = model_man . make_library ( library_yaml , library_yaml , comp_yaml ) return dict ( model_comp_dict = model_comp_dict , ModelManager = model_man )
Build and return a ModelManager object and fill the associated model library