

@contextlib.contextmanager
def bayesdb(metamodel=None, **kwargs):
    if (metamodel is None):
        crosscat = local_crosscat()
        metamodel = CrosscatMetamodel(crosscat)
    bdb = bayeslite.bayesdb_open(builtin_metamodels=False, **kwargs)
    bayeslite.bayesdb_register_metamodel(bdb, metamodel)
    try:
        (yield bdb)
    finally:
        bdb.close()

dataset/ETHPy150Open probcomp/bayeslite/tests/test_core.py bayesdb/original