<?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: Error downloading pretrained model within Python Tool on server for SentenceTransforme in Alteryx Server Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/913873#M10529</link>
    <description>&lt;P&gt;This fixed the issue I was having also.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2022 02:22:24 GMT</pubDate>
    <dc:creator>samdarmo</dc:creator>
    <dc:date>2022-03-15T02:22:24Z</dc:date>
    <item>
      <title>Error downloading pretrained model within Python Tool on server for SentenceTransformers</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/830156#M9582</link>
      <description>&lt;P&gt;I have created a workflow which compares the similarity of two sentences. I have done this by utilising the Python package SentenceTransformers to encode the sentence, then comparing the two encoded sentences using sklearn Cosine similarity formula to put a numeric figure on how similar the sentences are to each other.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Python script downloads a pretrained model which is hosted on the Hugging Face model hub.&amp;nbsp;The code to download the pretrained model is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; &lt;SPAN class=""&gt;sentence_transformers&lt;/SPAN&gt; &lt;SPAN class=""&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;SentenceTransformer&lt;/SPAN&gt;
&lt;SPAN class=""&gt;model&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;SentenceTransformer&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;'bert-base-nli-mean-tokens'&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script runs fine with no errors when I run it locally on designer. When I inspect the Jupiter notebook after I can see that it did in fact download the model. I get the correct output that I want. However, when I save the workflow to my private Alteryx server and run it I get the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="office.jpg" style="width: 999px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/205238i2D5BBED08E33BEA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="office.jpg" alt="office.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have underlined in red where it mentions that the numpy version is below what is required. I have tried to fix this by using the Alteryx.installPackage function but with no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any experience importing pretrained models using the Python tool within a workflow on Alteryx server? Can anyone tell me why exactly this is running fine locally but running into errors on the server? Any assistance at all with this is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 13:43:59 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/830156#M9582</guid>
      <dc:creator>CCarroll-</dc:creator>
      <dc:date>2021-10-04T13:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error downloading pretrained model within Python Tool on server for SentenceTransforme</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/830196#M9583</link>
      <description>&lt;P&gt;Fixed this by changing the package install command to upgrade&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Package.installPackages(package='numpy',install_type='install --upgrade')&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 14:23:24 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/830196#M9583</guid>
      <dc:creator>CCarroll-</dc:creator>
      <dc:date>2021-10-04T14:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Error downloading pretrained model within Python Tool on server for SentenceTransforme</title>
      <link>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/913873#M10529</link>
      <description>&lt;P&gt;This fixed the issue I was having also.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2022 02:22:24 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Server-Discussions/Error-downloading-pretrained-model-within-Python-Tool-on-server/m-p/913873#M10529</guid>
      <dc:creator>samdarmo</dc:creator>
      <dc:date>2022-03-15T02:22:24Z</dc:date>
    </item>
  </channel>
</rss>

