Example #1
0
 def test_transform_schema_higher_order(self):
     from lale.datasets.data_schemas import to_schema
     inner = LogisticRegression
     outer = IdentityWrapper(op=LogisticRegression)
     input_schema = to_schema(self._digits['X'])
     transformed_inner = inner.transform_schema(input_schema)
     transformed_outer = outer.transform_schema(input_schema)
     self.maxDiff = None
     self.assertEqual(transformed_inner, transformed_outer)
Example #2
0
    def test_transform_schema_higher_order(self):
        with EnableSchemaValidation():
            from lale.datasets.data_schemas import to_schema

            inner = LogisticRegression
            outer = IdentityWrapper(op=LogisticRegression)
            digits = self._digits
            assert digits is not None
            input_schema = to_schema(digits["X"])
            transformed_inner = inner.transform_schema(input_schema)
            transformed_outer = outer.transform_schema(input_schema)
            self.maxDiff = None
            self.assertEqual(transformed_inner, transformed_outer)
Example #3
0
    def test_transform_schema_higher_order(self):
        from lale.datasets.data_schemas import to_schema

        existing_flag = disable_data_schema_validation
        set_disable_data_schema_validation(False)

        inner = LogisticRegression
        outer = IdentityWrapper(op=LogisticRegression)
        input_schema = to_schema(self._digits["X"])
        transformed_inner = inner.transform_schema(input_schema)
        transformed_outer = outer.transform_schema(input_schema)
        self.maxDiff = None
        self.assertEqual(transformed_inner, transformed_outer)
        set_disable_data_schema_validation(existing_flag)