Exemplo n.º 1
0
def tpe_to_spearmint_helper(space, save=""):
    try:
        import hyperopt
    except ImportError:
        print "Cannot find hyperopt. To use this converter, modify $PYTHONPATH to contain a hyperopt installation"

    # First convert to smac
    tmp = tpe_to_smac.convert_tpe_to_smac_from_file(space)
    handle, tmp_file_name = tempfile.mkstemp()
    fh = open(tmp_file_name, 'w')
    fh.write(tmp)
    fh.close()

    # From smac convert to spearmint
    new_space = smac_to_spearmint.convert_smac_to_spearmint(tmp_file_name)

    os.remove(tmp_file_name)
    return new_space
Exemplo n.º 2
0
def tpe_to_spearmint_helper(space, save=""):
    try:
        import hyperopt
    except ImportError:
        print "Cannot find hyperopt. To use this converter, modify $PYTHONPATH to contain a hyperopt installation"

    # First convert to smac
    tmp = tpe_to_smac.convert_tpe_to_smac_from_file(space)
    handle, tmp_file_name = tempfile.mkstemp()
    fh = open(tmp_file_name, 'w')
    fh.write(tmp)
    fh.close()

    # From smac convert to spearmint
    new_space = smac_to_spearmint.convert_smac_to_spearmint(tmp_file_name)

    os.remove(tmp_file_name)
    return new_space
Exemplo n.º 3
0
def smac_to_spearmint_helper(space, save=""):
    # print "Convert %s from SMAC to SPEARMINT" % space
    return smac_to_spearmint.convert_smac_to_spearmint(space)
Exemplo n.º 4
0
def smac_to_spearmint_helper(space, save=""):
    # print "Convert %s from SMAC to SPEARMINT" % space
    return smac_to_spearmint.convert_smac_to_spearmint(space)