Looks like the PMMLBuilder class should provide a dummy constructor like PMMLBuilder(StructType, Model) (in addition to the non-dummy PMML(StructType, PipelineModel)), which would simply throw an IllegalArgumentException with the following message - "Expected PipelineModel, got Model"
Inspired by https://github.com/jpmml/pyspark2pmml/issues/27
Looks like the
PMMLBuilder
class should provide a dummy constructor likePMMLBuilder(StructType, Model)
(in addition to the non-dummyPMML(StructType, PipelineModel)
), which would simply throw an IllegalArgumentException with the following message - "Expected PipelineModel, got Model"