Exemplo n.º 1
0
def _incompatible_hparam_vals(vals, exp_type, exp_vals):
    for val in vals:
        val_type = summary.hparam_type([val])
        if val_type != exp_type or (
            val_type == summary.HPARAM_TYPE_STRING and val not in exp_vals
        ):
            yield val
Exemplo n.º 2
0
def _bad_domain_hparam_vals(name, vals, exp_vals):
    exp_type = summary.hparam_type(exp_vals)
    if exp_type == summary.HPARAM_TYPE_NONE:
        return []
    return [
        (name, bad_val)
        for bad_val in _incompatible_hparam_vals(vals, exp_type, exp_vals)
    ]