Giter Site home page Giter Site logo

Comments (6)

scorebot avatar scorebot commented on June 15, 2024

@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.

NatMzk avatar NatMzk commented on June 15, 2024

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.

scorebot avatar scorebot commented on June 15, 2024

@NatMzk Could you provide the full stack of the exception above? and try restarting the kernel before load model

from pypmml-spark.

NatMzk avatar NatMzk commented on June 15, 2024

I restarted kernel by Deattaching & Reattaching notebook with no results. Error trace is as following:

image

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.

scorebot avatar scorebot commented on June 15, 2024

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:

  1. set spark.jars,
pyspark --conf spark.jars="$(echo /Path/To/pypmml_spark/jars/*.jar | tr ' ' ',')"
  1. 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
  1. set spark.driver.extraClassPath and spark.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.

scorebot avatar scorebot commented on June 15, 2024

@NatMzk Did the methods above resolve your issue?

from pypmml-spark.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.