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
When I run this code using PySpark, I got the following error:
Py4JError: An error occurred while calling None.com.amazonaws.services.sagemaker.sparksdk.transformation.deserializers.ProtobufResponseRowDeserializer. Trace:
py4j.Py4JException: Constructor com.amazonaws.services.sagemaker.sparksdk.transformation.deserializers.ProtobufResponseRowDeserializer([class org.apache.spark.sql.types.StructType, class scala.collection.immutable.$colon$colon]) does not exist
at py4j.reflection.ReflectionEngine.getConstructor(ReflectionEngine.java:179)
at py4j.reflection.ReflectionEngine.getConstructor(ReflectionEngine.java:196)
at py4j.Gateway.invoke(Gateway.java:237)
at py4j.commands.ConstructorCommand.invokeConstructor(ConstructorCommand.java:80)
at py4j.commands.ConstructorCommand.execute(ConstructorCommand.java:69)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.lang.Thread.run(Thread.java:745)
Hi @ChuyangDeng , thanks for the reply. I understand that I need to send a StructType as the schema to ProtobufResponseRowDeserializer, which is already the case in the code I provide above.
However, the problem I was asking is the protobufKeys attribute. When I don't send this parameter, it gives me an NPE when I display the Dataframe of prediction output.
Please fill out the form below.
System Information
Describe the problem
I have the following code in pyspark trying to to construct a
SageMakerEstimator
for a random cut forest image:When I run this code using PySpark, I got the following error:
The problem is in the
ProtobufResponseRowDeserializer
. According to the source code of this object for Scala, it should accept aSeq
.What is the correct counterpart in PySpark? Obviously it doesn't accept a list of string.
I tried to search the
sagemaker-spark-sdk
and I couldn't find any reference there.The text was updated successfully, but these errors were encountered: