<?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: Unable to import SMOTE in Data Science</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4361834#M595</link>
    <description>&lt;P&gt;That solution isn't quite what I'm looking for since this notebook is part of a pipeline that needs to automatically run and already uses pyspark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution I did find is to use &lt;SPAN&gt;%pip install scikit-learn==&lt;/SPAN&gt;&lt;SPAN&gt;1.3&lt;/SPAN&gt;&lt;SPAN&gt;.0&lt;/SPAN&gt;. I don't have a python background, so I wasn't aware that there's a difference between !pip and %pip, but the microsoft documentation suggests %pip as it allows you to use a specific library for the current session.&amp;nbsp; Additionally since this is a pipeline, you need to include a bool parameter parameter&lt;SPAN&gt;_inlineInstallationEnabled = true to the notebook block.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See Python inline installation from the following docs.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/library-management" target="_blank"&gt;Manage Apache Spark libraries - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Mon, 13 Jan 2025 15:29:23 GMT</pubDate>
    <dc:creator>ericCheungBI</dc:creator>
    <dc:date>2025-01-13T15:29:23Z</dc:date>
    <item>
      <title>Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4355819#M588</link>
      <description>&lt;P&gt;Hi I'm notebooks and I'm trying to run&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;!pip install imbalanced-learn&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import imblearn&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; imblearn.over_sampling &lt;/SPAN&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;SMOTE&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But I keep getting this error.&lt;BR /&gt;&lt;SPAN class=""&gt;ImportError&lt;/SPAN&gt;: cannot import name 'UnsetMetadataPassedError' from 'sklearn.exceptions' (/home/trusted-service-user/cluster-env/trident_env/lib/python3.11/site-packages/sklearn/exceptions.py)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I looked around it and sounds like I need to update my python version. This doesn't really make sense to me because I used this notebook in November 2024 and it ran perfectly fine. Why would I need to update anything?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Jan 2025 20:37:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4355819#M588</guid>
      <dc:creator>ericCheungBI</dc:creator>
      <dc:date>2025-01-08T20:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4357169#M589</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346289" data-lia-user-login="ericCheungBI" class="lia-mention lia-mention-user"&gt;ericCheungBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to Microsoft Fabric Community Forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though the notebook worked before, some libraries may have been updated since then. These updates could introduce breaking changes or incompatibilities, which is often why such errors appear even on previously working code.&lt;/P&gt;
&lt;P&gt;Try updating the library to the latest version and let me know if you're still having issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Did I answer your question? Mark my post as a solution, this will help others!&lt;BR /&gt;If my response(s) assisted you in any way, don't forget to give "Kudos"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Vinay Pabbu&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 12:43:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4357169#M589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-09T12:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4357498#M590</link>
      <description>&lt;P&gt;Hey Vinay, I tried doing that, but that requires updating SKLearn to 1.6.0. After updating, it says to restart the kernel to use the updated packages. Is there a way to restart?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 21:14:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4357498#M590</guid>
      <dc:creator>ericCheungBI</dc:creator>
      <dc:date>2025-01-09T21:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4358378#M591</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346289" data-lia-user-login="ericCheungBI" class="lia-mention lia-mention-user"&gt;ericCheungBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To restart the kernel, follow these steps:&lt;/P&gt;
&lt;P&gt;After connecting to the session, you will see the option to restart the kernel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vinay Pabbu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 07:28:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4358378#M591</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-10T07:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4358901#M592</link>
      <description>&lt;P&gt;Do I need a choose a setting to make that show up?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 14:22:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4358901#M592</guid>
      <dc:creator>ericCheungBI</dc:creator>
      <dc:date>2025-01-10T14:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4360943#M594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="346289" data-lia-user-login="ericCheungBI" class="lia-mention lia-mention-user"&gt;ericCheungBI&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By default, it will be available in Python, but it will not be available in PySpark.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Vinay Pabbu&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2025 07:01:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4360943#M594</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-01-13T07:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to import SMOTE</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4361834#M595</link>
      <description>&lt;P&gt;That solution isn't quite what I'm looking for since this notebook is part of a pipeline that needs to automatically run and already uses pyspark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution I did find is to use &lt;SPAN&gt;%pip install scikit-learn==&lt;/SPAN&gt;&lt;SPAN&gt;1.3&lt;/SPAN&gt;&lt;SPAN&gt;.0&lt;/SPAN&gt;. I don't have a python background, so I wasn't aware that there's a difference between !pip and %pip, but the microsoft documentation suggests %pip as it allows you to use a specific library for the current session.&amp;nbsp; Additionally since this is a pipeline, you need to include a bool parameter parameter&lt;SPAN&gt;_inlineInstallationEnabled = true to the notebook block.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See Python inline installation from the following docs.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-engineering/library-management" target="_blank"&gt;Manage Apache Spark libraries - Microsoft Fabric | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Jan 2025 15:29:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Science/Unable-to-import-SMOTE/m-p/4361834#M595</guid>
      <dc:creator>ericCheungBI</dc:creator>
      <dc:date>2025-01-13T15:29:23Z</dc:date>
    </item>
  </channel>
</rss>

