Skip to content

spark-tree-plotting lib seems to have lost support for Spark 2.2+ #2

@michalrudko

Description

@michalrudko

Hi,

We were happy to find this lib as we need to visualize the decision tree created using ML, but we are afraid that it cannot support the current Spark version.
We were trying multiple options in terms of setup, but when calling the plot_tree function, we get the following error:

ERROR:root:Exception while sending command.
Traceback (most recent call last):
File "/opt/cloudera/parcels/SPARK2/lib/spark2/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 883, in send_command
response = connection.send_command(command)
File "/opt/cloudera/parcels/SPARK2/lib/spark2/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1040, in send_command
"Error while receiving", e, proto.ERROR_ON_RECEIVE)
Py4JNetworkError: Error while receiving

(...)

Py4JError: com.jasoto.spark.ml.SparkMLTree does not exist in the JVM

Code:

SUBMIT_ARGS = "--packages julioasotodv:spark-tree-plotting:0.2 pyspark-shell"
os.environ["PYSPARK_SUBMIT_ARGS"] = SUBMIT_ARGS

spark = (
SparkSession
.builder
.appName('jartest')
#.config('spark.jars', '/tmp/UniCredit_T100900/jars/spark-tree-plotting-0.2.jar')
.getOrCreate()
)

We'd appreciate some support on usage of this package.

Regards,
Michal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions