-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spark-tree-plotting lib seems to have lost support for Spark 2.2+ #2
Comments
try in this way, I have tested it on spark2.3.1 and spark 2.4, both works
|
I get the same error when I run: from spark_tree_plotting import plot_tree # requires pydot3 your_dtree_classification_model = dtModel png_string = plot_tree(dtModel, on Databricks. Is this not compatible with Databricks? Thanks! |
I created the pull request to solve this issue: #7 Here I used SBT 1.6.2 Run : sbt assembly and load the assembly jar into Databricks cluster library. |
@wlbhiro @cerenaaa @jdongca2003 @agupta004 @witwall any idea how to use that jar file in Databricks?
than imported that jar file in Databricks (https://docs.databricks.com/libraries/workspace-libraries.html). but still get this error:
|
give up this one, and have a look https://github.com/parrt/dtreeviz, introA python library for decision tree visualization and model interpretation. Currently supports scikit-learn, XGBoost, Spark MLlib, and LightGBM trees. some samples |
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
The text was updated successfully, but these errors were encountered: