Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: 'Pipeline' object has no attribute '_transfer_param_map_to_java'

I use pyspark.ml.tuning.CrossValidator and Pipline to train a CrossValidatorModel named cv_model,after that,I want to persist the model, so i use cv_model.save to save my model,but an error occured:AttributeError: 'Pipeline' object has no attribute '_transfer_param_map_to_java' mycode

error message

I do not know how to solve the error. thanks for help me!

like image 352
shuai fu Avatar asked Jan 29 '23 06:01

shuai fu


1 Answers

i find a way to solve the problem myself:

pip_model = cv_model.bestModel
pip_model.write().overwrite().save("/Users/fushuai/PyCharmProject/CTREstimation/model")
like image 79
shuai fu Avatar answered Jan 31 '23 07:01

shuai fu