lale.schema_simplifier module¶
-
lale.schema_simplifier.enumValues(es: lale.schema_simplifier.set_with_str_for_keys[Any], s: Any) → lale.schema_simplifier.set_with_str_for_keys[Any][source]¶ Given an enumeration set and a schema, return all the consistent values of the enumeration.
-
lale.schema_simplifier.findRelevantFields(schema: Any) → Optional[Set[str]][source]¶ Either returns the relevant fields for the schema, or None if there was none specified
-
lale.schema_simplifier.liftAllOf(schemas: List[Any]) → Iterator[Any][source]¶ Given a list of schemas, if any of them are allOf schemas, lift them out to the top level
-
lale.schema_simplifier.liftAnyOf(schemas: List[Any]) → Iterator[Any][source]¶ Given a list of schemas, if any of them are anyOf schemas, lift them out to the top level
-
lale.schema_simplifier.narrowSimplifyAndFilter(schema: Any, floatAny: bool) → Optional[Any][source]¶
-
lale.schema_simplifier.narrowToGivenRelevantFields(schema: Any, relevantFields: Set[str]) → Any[source]¶
-
class
lale.schema_simplifier.set_with_str_for_keys(elems: Union[Dict[str, VV], Iterator[VV]])[source]¶ Bases:
typing.GenericThis mimicks a set, but uses the string representation of the elements for comparison tests. It can be used for unhashable elements, as long as the str function is injective
-
lale.schema_simplifier.simplify(schema: Any, floatAny: bool) → Any[source]¶ Tries to simplify a schema into an equivalent but more compact/simpler one. If floatAny if true, then the only anyOf in the return value will be at the top level. Using this option may cause a combinatorial blowup in the size of the schema