SynapseML
SynapseML copied to clipboard
[BUG] java.lang.NoSuchMethodError when using synapse.ml.lightgbm
SynapseML version
synapseml_2.12:1.0.4
System information
- Language version (e.g. python 3.8, scala 2.12):
- Spark Version (e.g. 3.4.1):
- Spark Platform ( Databricks):
- Databricks Runtime Version (13.3 LTS ML (includes Apache Spark 3.4.1, Scala 2.12))
Describe the problem
I have installed Synapse ML onto my databricks cluster from Maven using cooradinates com.microsoft.azure:synapseml_2.12:1.0.4 which should support spark 3.4.
In my notebook, I have imported the LightGBMRegressor using the code from synapse.ml.lightgbm.LightGBMRegressor import LightGBMRegressor
But when I call the regressor in the notebook, it throws me an error message
Error Message:
Error encountered: An error occurred while calling None.com.microsoft.azure.synapse.ml.lightgbm.LightGBMRegressor.
: java.lang.NoSuchMethodError: org.apache.spark.ml.ComplexParamsWritable.$init$(Lorg/apache/spark/ml/ComplexParamsWritable;)V
at com.microsoft.azure.synapse.ml.lightgbm.LightGBMRegressor.
This is happening because of Spark version mismatch but SynapseML package I installed is expected to support Spark cluster has at least Spark 3.2 and Scala 2.12. This according to theinstallation page of SynapseML. https://microsoft.github.io/SynapseML/docs/Get%20Started/Install%20SynapseML/.
Kindly help me how to resolve it?
Code to reproduce issue
try: from synapse.ml.lightgbm.LightGBMRegressor import LightGBMRegressor lgbm_cv = LightGBMRegressor() except Exception as e: print(f"Error encountered: {e}")
Other info / logs
No response
What component(s) does this bug affect?
- [ ]
area/cognitive: Cognitive project - [ ]
area/core: Core project - [ ]
area/deep-learning: DeepLearning project - [ ]
area/lightgbm: Lightgbm project - [ ]
area/opencv: Opencv project - [ ]
area/vw: VW project - [ ]
area/website: Website - [ ]
area/build: Project build system - [ ]
area/notebooks: Samples under notebooks folder - [ ]
area/docker: Docker usage - [ ]
area/models: models related issue
What language(s) does this bug affect?
- [ ]
language/scala: Scala source code - [x]
language/python: Pyspark APIs - [ ]
language/r: R APIs - [ ]
language/csharp: .NET APIs - [ ]
language/new: Proposals for new client languages
What integration(s) does this bug affect?
- [ ]
integrations/synapse: Azure Synapse integrations - [ ]
integrations/azureml: Azure ML integrations - [ ]
integrations/databricks: Databricks integrations