-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I tried serializing pipeline with mleap but it's giving error
"ColumnTransformer' object has no attribute 'op"
Below are segments from the pipline:
numeric_transformer = Pipeline(steps=[ ('imputer', SimpleImputer(strategy='median')), ('scaler', StandardScaler())])
categorical_transformer = Pipeline(steps=[
('imputer', SimpleImputer(strategy='constant', fill_value='missing')),
('onehot', OneHotEncoder(handle_unknown='ignore'))])
preprocessor = ColumnTransformer( transformers=[ ('num', numeric_transformer, numeric_features),
('cat', categorical_transformer, categorical_features), ])
mlp = MLPClassifier(hidden_layer_sizes=(8,6,1), max_iter=300,activation = 'tanh',solver='adam',random_state=123)
pipe = Pipeline([('preprocessor', preprocessor), ('mlp', mlp) ])
pipe.mlinit()
model = pipe.fit(X_train,y_train)
model.serialize_to_bundle("jar:file:/C://Users/logReg.zip")