<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Predicted results ingestion takes a lot of time in Data Science</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4892438#M962</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1437683" target="_blank"&gt;@omkar3888&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
    <pubDate>Thu, 04 Dec 2025 05:00:05 GMT</pubDate>
    <dc:creator>v-dineshya</dc:creator>
    <dc:date>2025-12-04T05:00:05Z</dc:date>
    <item>
      <title>Predicted results ingestion takes a lot of time</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4886336#M934</link>
      <description>&lt;P&gt;Hello Community Users,&lt;/P&gt;&lt;P&gt;i was trying to develope a ML model in fabric using pyspark notebook. i has also registered model decisiontreeclassifier with tfidvectorizer . but after using above registered model for prediction the ingestion of prediction takes hell lot of time. to ingest 10K records it tool 25 min and my prediction dataframe has 3 mn records. I followed each and every step mentioned in fabric github repo.&amp;nbsp;&lt;SPAN&gt;since the model is not working across the entire cluster and i am only getting a single node to work on the process. can somebody explain why this is happening..? am i missing any step.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 08:28:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4886336#M934</guid>
      <dc:creator>omkar3888</dc:creator>
      <dc:date>2025-11-26T08:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Predicted results ingestion takes a lot of time</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4887230#M937</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1437683" data-lia-user-login="omkar3888" class="lia-mention lia-mention-user"&gt;omkar3888&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wrapped your scikit‑learn DecisionTreeClassifier + TfidfVectorizer pipeline in a regular Python UDF (per-row), Spark has to shuttle each row across the JVM &amp;lt;-&amp;gt; Python boundary, which is extremely slow and often collapses execution to effectively one core/node. Regular UDFs operate one value at a time and suffer from serialization overhead; vectorized Pandas UDFs via Arrow process batches, dramatically reducing that overhead.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Fabric’s default/starter pool supports single-node clusters driver and executor co-located. If your workspace/pool/environment is set to minimum nodes = 1, you will observe exactly one node working, regardless of data size. Consider a custom Spark pool or higher node count and appropriate executor/core settings.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you are collecting to the driver like df.collect().toPandas() then writing or writing with features like Optimize Write and V‑Order without tuning, the write phase can dominate. Optimize Write introduces an extra shuffle to produce larger files; Microsoft’s docs note it can add ~15% to write times on average (in exchange for much faster reads). Misconfigured writes or small-file patterns can explode latency.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Spark best-practices not enabled, If Adaptive Query Execution (AQE), proper partitioning, and column pruning aren’t in place, you can get skewed partitions and inefficient shuffles. Fabric’s Spark basics guide calls these out as default tuning steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try below things to fix the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Use Fabric’s scalable batch scoring instead of manual UDFs. If you registered the model in Fabric (MLflow), call it with the PREDICT path:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MLFlowTransformer API (SynapseML) on a Spark DataFrame cluster-distributed scoring, no per-row Python overhead. Please refer sample code.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;from synapse.ml.mlflow import MLFlowTransformer&lt;/P&gt;
&lt;P&gt;pred_df = (MLFlowTransformer() &lt;BR /&gt;.setModelUri("models:/YourModelName/1") &lt;BR /&gt;.transform(input_df))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: This approach is built for Fabric and scales out across executors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Check cluster settings,&lt;/P&gt;
&lt;P&gt;Workspace --&amp;gt; Spark Compute: node count &amp;gt; 1? autoscale enabled appropriately? &lt;BR /&gt;Environment --&amp;gt; Compute: driver/executor cores/memory tuned?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;3. Look for task/executor usage, Python UDF time, shuffle hotspots, and write stages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Enable basics, AQE on, DataFrame APIs (not RDD), prune columns before prediction, avoid wide rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5. Write path, Ensure you don’t collect() before writing. Use distributed .write.format("delta") and tune Optimize Write/V‑Order as per workload.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Note: Register your model with MLflow in Fabric. Use MLFlowTransformer or predict_batch_udf for distributed scoring. Write predictions directly to Delta; test with Optimize Write on/off and adjust bin size for your latency target. Verify multi-node compute and monitor the run. This typically moves throughput from hundreds of rows/sec (scalar UDF) to tens/hundreds of thousands of rows/sec (batch/Arrow), and ensures all executors participate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer below links.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/model-scoring-predict" target="_blank"&gt;Model scoring with PREDICT - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/lakehouse-and-delta-tables" target="_blank"&gt;Lakehouse and Delta Tables - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-batch-scoring" target="_blank"&gt;Tutorial: Perform batch scoring and save predictions - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/workspace-admin-settings" target="_blank"&gt;Workspace administration settings in Microsoft Fabric - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/environment-manage-compute" target="_blank"&gt;Compute Management in Fabric Environments - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/spark-best-practices-basics" target="_blank"&gt;Spark Basics - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/tutorial-data-science-train-models" target="_blank"&gt;Tutorial: Train and register machine learning models - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/delta-optimization-and-v-order?tabs=sparksql" target="_blank"&gt;Delta Lake table optimization and V-Order - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/synapse-analytics/spark/optimize-write-for-apache-spark" target="_blank"&gt;Using optimize write on Apache Spark to produce more efficient tables - Azure Synapse Analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this information helps. Please do let us know if you have any further queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 06:27:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4887230#M937</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-11-27T06:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Predicted results ingestion takes a lot of time</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4889240#M953</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1437683" data-lia-user-login="omkar3888" class="lia-mention lia-mention-user"&gt;omkar3888&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 04:23:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4889240#M953</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-12-01T04:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Predicted results ingestion takes a lot of time</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4892438#M962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1437683" target="_blank"&gt;@omkar3888&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 05:00:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Predicted-results-ingestion-takes-a-lot-of-time/m-p/4892438#M962</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-12-04T05:00:05Z</dc:date>
    </item>
  </channel>
</rss>

