我正在尝试设置一个简单的代码,在其中传递数据帧并使用 johnSnowLabs Spark-NLP 库提供的预训练解释管道对其进行测试。我正在使用 anaconda 的 jupyter 笔记本,并使用 apache toree 进行了 spark scala kernet 设置。每次我运行应该加载预训练管道的步骤时,它都会抛出一个 tensorflow 错误。有没有办法可以在本地 Windows 上运行它?
I was trying this in a maven project earlier and the same error had happened. Another colleague tried it on a linux system and it worked. Below is the code I have tried and the error that it gave.
import org.apache.spark.ml.PipelineModel
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
import com.johnsnowlabs.nlp.SparkNLP
import org.apache.spark.sql.SparkSession
val spark: SparkSession = SparkSession
.builder()
.appName("test")
.master("local[*]")
.config("spark.driver.memory", "4G")
.config("spark.kryoserializer.buffer.max", "200M")
.config("spark.serializer", "org.apache.spark.serializer.KryoSerializer") …Run Code Online (Sandbox Code Playgroud)