def missing_dimension_conflict(old_config, new_config): """Generate a missing dimension conflict""" name = "missing" prior = "uniform(-10, 10)" dimension = DimensionBuilder().build(name, prior) return conflicts.MissingDimensionConflict(old_config, new_config, dimension, prior)
def missing_dimension_with_default_conflict(old_config, new_config): """Generate a missing dimension conflict with a default value""" name = "missing" prior = "uniform(-10, 10, default_value=0.0)" dimension = DimensionBuilder().build(name, prior) return conflicts.MissingDimensionConflict(old_config, new_config, dimension, prior)
def missing_dimension_from_config_conflict(old_config_with_script_conf, new_config_with_script_conf): """Generate a missing dimension conflict in the config file""" name = "dropped" prior = "uniform(-1, 5)" dimension = DimensionBuilder().build(name, prior) return conflicts.MissingDimensionConflict(old_config_with_script_conf, new_config_with_script_conf, dimension, prior)