intel-analytics / ipex-llm

Accelerate local LLM inference and finetuning (LLaMA, Mistral, ChatGLM, Qwen, Mixtral, Gemma, Phi, MiniCPM, Qwen-VL, MiniCPM-V, etc.) on Intel XPU (e.g., local PC with iGPU and NPU, discrete GPU such as Arc, Flex and Max); seamlessly integrate with llama.cpp, Ollama, HuggingFace, LangChain, LlamaIndex, vLLM, GraphRAG, DeepSpeed, Axolotl, etc
Apache License 2.0
6.72k stars 1.26k forks source link

TypeError: 'JavaPackage' object is not callable, when spark-commit xgboost_example #5069

Open 00-Luoshu opened 2 years ago

00-Luoshu commented 2 years ago

And I didnot  downloaded Analytics Zoo zip package, just use spark-submit
How can I fix this?
sgwhat commented 2 years ago

Reason:

Lack of BigDL jar files in your script, JavaPackage happens because python cannot find the java class.

Solutions:

Use spark-submit

  1. Download bigdl dllib jars file from BigDL DLLib Jars.
  2. Submit following the script below:
/home/intel/spark-3.1.2-bin-hadoop2.7/bin/spark-submit \
  --master "local[4]" \
  --driver-memory 2g \
  --executor-memory 2g \
  --jars /path/to/bigdl-dllib-spark_${SPARK_VERSION}-jar-with-dependencies.jar \
  local:///home/zhangyu/BigDL/python/dllib/examples/nnframes/xgboost/xgboost_example.py --file-path data/Boston_Housing.csv

Use spark-submit-with-bigdl

Submit following the script below:

/home/zhangyu/BigDL/scripts/spark-submit-with-bigdl \
   --master ${MASTER} \
   --driver-memory 2g \
   --executor-memory 2g \
   local:///home/zhangyu/BigDL/python/dllib/examples/nnframes/xgboost/xgboost_example.py --file-path data/Boston_Housing.csv 

NOTE: