def test_conversion_bad_inputs(self):
# Error on converting an untrained model
with self.assertRaises(TypeError):
model = LinearRegression()
spec = convert(model, 'data', 'out')
# Check the expected class during covnersion.
from sklearn.preprocessing import OneHotEncoder
with self.assertRaises(TypeError):
model = OneHotEncoder()
spec = convert(model, 'data', 'out')
评论列表
文章目录