Comments (6)
@NatMzk The ScoreModel.fromFile()
expects a local pathname of the model, could you use other methods like fromBytes
or fromString
to load the model? so first you should read the model from the path dbfs:/...
by yourself.
from pypmml-spark.
from my understanding dbfs
path is databricks's local path where the XML pmml model is located. I tried using fromBytes
and fromString
methods but it results with the same error.
from pypmml-spark.
@NatMzk Could you provide the full stack of the exception above? and try restarting the kernel before load model
from pypmml-spark.
I restarted kernel by Deattaching & Reattaching notebook with no results. Error trace is as following:
I am running Databricks Runtime Version 10.4 LTS on single node cluster (not pure spark).
Apache Spark=3.2.1
Java Version=1.8.0_302 (Azul Systems, Inc.)
from pypmml-spark.
I don't have the Databricks Runtime, but when I remove the links created by the script link_pmml4s_jars_into_spark.py
, I can reproduce the same error on my side, so I guess your issue could be caused by the same reason that those dependent jars of pmml4s are not found by Spark, there some several ways to try:
For details about the following configurations, see the official doc: https://spark.apache.org/docs/latest/configuration.html
All those ones can be specified by the conf file or the command line, check the doc for your eivironment. Take the command line to launch pyspark as an example:
- set
spark.jars
,
pyspark --conf spark.jars="$(echo /Path/To/pypmml_spark/jars/*.jar | tr ' ' ',')"
- set
spark.jars.packages
pyspark --conf spark.jars.packages=org.pmml4s:pmml4s_2.12:0.9.16,org.pmml4s:pmml4s-spark_2.12:0.9.16,io.spray:spray-json_2.12:1.3.5,org.apache.commons:commons-math3:3.6.1
- set
spark.driver.extraClassPath
andspark.executor.extraClassPath
pyspark --conf spark.driver.extraClassPath="/Path/To/pypmml_spark/jars/*" --conf spark.executor.extraClassPath="/Path/To/pypmml_spark/jars/*"
Recommend the options 1 and 2
from pypmml-spark.
@NatMzk Did the methods above resolve your issue?
from pypmml-spark.
Related Issues (8)
- java.io.NotSerializableException: org.pmml4s.transformations.FieldColumnPair #1 HOT 2
- Potential dependency conflicts between pypmml-spark and py4j HOT 4
- Output unmatch between jpmml and pypmml HOT 11
- NoClassDefFoundError: scala/Product$class HOT 5
- this tool only support pyspark<3.0 ? when i was trying using ScoreModel.fromFile("{"file_path}"), an Error called """TypeError: 'JavaPackage' object is not callable""" ocurred HOT 6
- It couldn't output raw prediction probability. HOT 12
- Importing .pmml file throws error TypeError: 'JavaPackage' object is not callable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypmml-spark.