We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, schema-checking raises an internal assertion for constraints of the form X/isSparse that are "bare", i.e., not inside of an anyOf.
X/isSparse
anyOf
Test to reproduce:
import jsonschema import scipy.sparse import sklearn.datasets import sklearn.decomposition import unittest import lale.lib.sklearn class TestBareSparsenessConstraint(unittest.TestCase): def setUp(self): X, y = sklearn.datasets.load_iris(return_X_y=True) self.sparse_X = scipy.sparse.csr_matrix(X) self.y = y def test_bare_sparseness_constraint(self): #without Lale trainable = sklearn.decomposition.PCA() with self.assertRaisesRegex(TypeError, "PCA does not support sparse"): trained = trainable.fit(self.sparse_X, self.y) #with Lale and schema validation with EnableSchemaValidation(): trainable = lale.lib.sklearn.PCA() with self.assertRaises(jsonschema.ValidationError): trained = trainable.fit(self.sparse_X, self.y)
Output:
File "lale/lale/operators.py", line 1984, in _validate_hyperparams assert e.schema_path[2] == "anyOf" AssertionError
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, schema-checking raises an internal assertion for constraints of the form
X/isSparse
that are "bare", i.e., not inside of ananyOf
.Test to reproduce:
Output:
The text was updated successfully, but these errors were encountered: