onnxmltools icon indicating copy to clipboard operation
onnxmltools copied to clipboard

Seems no Support for pyspark ALS

Open ac4922 opened this issue 5 years ago • 1 comments

I am trying to convert a ASL model to ONNX. But it seems there is no support for it . Could you please check this?

Code:

from pyspark.ml.recommendation import ALS model = ALS(userCol='userid',itemCol='catid',ratingCol='rating', coldStartStrategy="drop") pipeline = Pipeline(stages=[model]) initial_type = [ ("numfeat1", FloatTensorType([1, 1]))

]

model_onnx = convert_sparkml(pipeline, 'Sparkml Test Pipeline', buildInitialTypesSimple(test_data))

ERROR:

/opt/conda/lib/python3.7/site-packages/onnxmltools/convert/sparkml/ops_names.py in get_sparkml_operator_name(model_type) 88 ''' 89 if model_type not in sparkml_operator_name_map: ---> 90 raise ValueError("No proper operator name found for '%s'" % model_type) 91 return sparkml_operator_name_map[model_type] 92

ValueError: No proper operator name found for '<class 'pyspark.ml.pipeline.Pipeline'>'

ac4922 avatar Jun 27 '19 20:06 ac4922

Hello @ac4922. Unfortunately we don't have the resources currently to add the Alternating Least Squares PySpark operator. We welcome community contributions!

vinitra-zz avatar Jun 27 '19 23:06 vinitra-zz