Open TakuyaInoue-github opened 1 year ago
Hey @TakuyaInoue-github :wave:! Thank you so much for reporting the issue/feature request :rotating_light:. Someone from SynapseML Team will be looking to triage this issue soon. We appreciate your patience.
Thanks for reporting this @TakuyaInoue-github . Looks like @memoryz is already on the case
@TakuyaInoue-github can you show me the full error stack? I want to understand where is this error coming from.
@memoryz Sure, The following is a stack trace of the error.
Traceback (most recent call last):
File "/mnt/share/example/shap_example_not_working.py", line 172, in <module>
shap_df = shap.transform(explain_instances)
File "/opt/spark/python/pyspark/ml/base.py", line 217, in transform
return self._transform(dataset)
File "/opt/spark/python/pyspark/ml/wrapper.py", line 349, in _transform
self._transfer_params_to_java()
File "/home/user/.local/lib/python3.10/site-packages/synapse/ml/core/schema/Utils.py", line 131, in _transfer_params_to_java
pair = self._make_java_param_pair(param, self._paramMap[param])
File "/home/user/.local/lib/python3.10/site-packages/synapse/ml/core/serialize/java_params_patch.py", line 88, in _mml_make_java_param_pair
java_value = _mml_py2java(sc, value)
File "/home/user/.local/lib/python3.10/site-packages/synapse/ml/core/serialize/java_params_patch.py", line 60, in _mml_py2java
obj = obj._to_java()
File "/opt/spark/python/pyspark/ml/pipeline.py", line 333, in _to_java
java_stages[idx] = stage._to_java()
AttributeError: 'SimpleTransformer' object has no attribute '_to_java'
I hope you find it useful. Thank you.
Hi, is there any update regarding this? I encountered the same error when trying to calculate SHAPs for a SparkXGBClassifier model. Thank you in advance for the information.
Hi, im having the same problem for SparkXGBClassifer! Any updates?
SynapseML version
0.10.1
System information
Describe the problem
Hello,
I encountered an issue when using the TabularSHAP module in SynapseML with a custom Transformer.I received the following error message (
AttributeError:
SimpleTransformerobject has no attribute '_to_java'
).I believe this issue may be caused by either a bug in the TabularSHAP implementation or an insufficient implementation of my custom Transformer. Could you please help me determine whether this issue is due to a bug in TabularSHAP or a problem with my custom Transformer.If it is the latter, any suggestions for improving my implementation would be greatly appreciated.
Thank you in advice for your assistance.
Code to reproduce issue
Other info / logs
Attribution Error:
SimpleTransfomer
object has no attribute '_to_java'What component(s) does this bug affect?
area/cognitive
: Cognitive projectarea/core
: Core projectarea/deep-learning
: DeepLearning projectarea/lightgbm
: Lightgbm projectarea/opencv
: Opencv projectarea/vw
: VW projectarea/website
: Websitearea/build
: Project build systemarea/notebooks
: Samples under notebooks folderarea/docker
: Docker usagearea/models
: models related issueWhat language(s) does this bug affect?
language/scala
: Scala source codelanguage/python
: Pyspark APIslanguage/r
: R APIslanguage/csharp
: .NET APIslanguage/new
: Proposals for new client languagesWhat integration(s) does this bug affect?
integrations/synapse
: Azure Synapse integrationsintegrations/azureml
: Azure ML integrationsintegrations/databricks
: Databricks integrations