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
This is not an issue and is more of a request for guidance. I'd like to just use the TensorFlowInferSchema functionality in my Java spark job. Below is the sample snippet
I'm not familiar with Scala and it appears that it's not possible to create TypeTag[Example] in java.
Appreciate if you could share your thoughts on the below
Is it safe (and possible) to just consume TensorFlowInferSchema in Java without going via spark.read.format("tfrecord").option("recordType", "Example")?
What to pass for the TypeTag[T] argument?
Is there a Java example for this use case
Thanks for maintaining this project and highly appreciate your help!
The text was updated successfully, but these errors were encountered:
"TensorFlowInferSchema" only infers the schema. Is that what you need?
I am not familiar with Spark Java API, but can you call scala function from Java?
If you want to read/write TFRecord with Java API, I assume something like this will work. Dataset<Row> usersDF = spark.read().format("tfrecord").load("examples/src/main/resources/users.tfrecord"); usersDF.select("name", "favorite_color").write().format("tfrecord").save("namesAndFavColors.tfrecord");
Thanks for the example on loading - Yes, that should help to read tfrecord files into a DataFrame. However, as you point out, I just need automatic schema inference as we already build a JavaRDD<Example>. My understanding is Java classes can consume Scala classes and vice versa but I'm not familiar enough to understand if TensorFlowInferSchema can be invoked.
I was hoping to get some help there.
This is not an issue and is more of a request for guidance. I'd like to just use the
TensorFlowInferSchema
functionality in my Java spark job. Below is the sample snippetHowever, the apply method expects a second argument -
implicit evidence$1 : scala.reflect.runtime.universe.TypeTag[T]
.Below is the compiled Java class
I'm not familiar with Scala and it appears that it's not possible to create TypeTag[Example] in java.
Appreciate if you could share your thoughts on the below
TensorFlowInferSchema
in Java without going viaspark.read.format("tfrecord").option("recordType", "Example")
?TypeTag[T]
argument?Thanks for maintaining this project and highly appreciate your help!
The text was updated successfully, but these errors were encountered: