Issue in SynapseML when connecting to Azure Form Recognizer
I am using the following Python code in a SPARK Pool notebook in Azure Synapse Analytics in order to connect to the Azure Form Recognizer service:
import synapse.ml
from synapse.ml.cognitive import *
cognitive_service_name = "CognitiveServiceFormRecognizer"
from pyspark.sql.functions import col, flatten, regexp_replace, explode, create_map, lit
emptyDf = spark.createDataFrame([("",)])
listCustomModels = (ListCustomModels()
.setLinkedService(cognitive_service_name)
.setOp("full")
.setOutputCol("models")
.setConcurrency(5))
(listCustomModels
.transform(emptyDf)
.withColumn("modelIds", col("models.modelList.modelId"))
.select("modelIds")).show()
But it returns an empty list. However, when I connect to the Form Recognizer via rest API, it returns the list of all models.
I have already asked the question from the SynapseML Github (https://github.com/microsoft/SynapseML). No answer!!!!!
Please let me know, what should I do.
Another question: Is there any alternative for SynapseML in Synapse analytics?
Thanks for any help.