autodeployai / pypmml-spark

Python PMML scoring library for PySpark as SparkML Transformer
Apache License 2.0
21 stars 2 forks source link

Importing .pmml file throws error TypeError: 'JavaPackage' object is not callable #8

Closed ghost closed 2 years ago

ghost commented 2 years ago

As per the title, importing a .pmml file is throwing this error. I'm using the following versions: pypmml-spark-0.9.15 pyspark-3.2.1 py4j-0.10.9.3 Is this a solvable problem?

scorebot commented 2 years ago

@ngpc-sonae you need to make sure both jars pmml4s-spark_2.12-0.9.15.jar and pmml4s_2.12-0.9.15.jar of PMML4S in the classpath, you could run the script link_pmml4s_jars_into_spark.py or specify them using the parameter of spark, see README of this project: https://github.com/autodeployai/pypmml-spark

ghost commented 2 years ago

@scorebot thanks for the quick reply. Will try. My bad for not seeing the README to the end.