You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Predicting from H2O3 model with shapley values produces error as below screenshot. This is due to a datatype conversion error and was fixed using the below. WF asking this to be part of the pysparkling package.
Expected behavior
No error should occur and the datatype conversion should happen within pysparkling.
Fix used by customer.
convert LongType columns in the DataFrame to DoubleType before the model.transform(dataFrame) .
See fix below:
for col_name in df.columns:
if df.schema[col_name].dataType == LongType():
df = df.withColumn(col_name, F.col(col_name).cast(DoubleType()))
Steps to reproduce
Steps to reproduce the behavior (with working code on a sample dataset, if possible):
Do this
Do that
Do something else
See error
Upload logs
If you can, please upload the H2O logs. More information on how to do that is available here, or you can use the h2o.downloadAllLogs() in R or the h2o.download_all_logs() function in Python.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
H2O version, Operating System and Environment
3.34.0.8+ Pysparkling issue. Ticket #https://support.h2o.ai/a/tickets/109423 from Well Fargo
Actual behavior
Predicting from H2O3 model with shapley values produces error as below screenshot. This is due to a datatype conversion error and was fixed using the below. WF asking this to be part of the pysparkling package.
Expected behavior
No error should occur and the datatype conversion should happen within pysparkling.
Fix used by customer.
convert LongType columns in the DataFrame to DoubleType before the model.transform(dataFrame) .
See fix below:
for col_name in df.columns:
if df.schema[col_name].dataType == LongType():
df = df.withColumn(col_name, F.col(col_name).cast(DoubleType()))
Steps to reproduce
Steps to reproduce the behavior (with working code on a sample dataset, if possible):
Upload logs
If you can, please upload the H2O logs. More information on how to do that is available here, or you can use the
h2o.downloadAllLogs()
in R or theh2o.download_all_logs()
function in Python.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: