<?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: Model Studio open source code node - generate score code with PMML in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569431#M452</link>
    <description>&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robbe&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 13:25:55 GMT</pubDate>
    <dc:creator>RVB</dc:creator>
    <dc:date>2019-07-30T13:25:55Z</dc:date>
    <item>
      <title>Model Studio open source code node - generate score code with PMML</title>
      <link>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/567186#M433</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using Model Studio on SAS Viya 3.4. I am able to run an Open Source Code Node with an R or Python model in it. However, as mentioned in&amp;nbsp;&lt;A href="https://go.documentation.sas.com/?cdcId=vdmmlcdc&amp;amp;cdcVersion=8.3&amp;amp;docsetId=vdmmlref&amp;amp;docsetTarget=n1jnhimqytrjbin1msve5hekiw3v.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;the online documentation&lt;/A&gt;, the Open Source Code Node doesn't support the operations&lt;SPAN&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Download score code"&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Register model"&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Publish model"&lt;/SPAN&gt;,&lt;SPAN&gt;&amp;nbsp;...&lt;/SPAN&gt;&amp;nbsp;in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Pipeline Comparison&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tab.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="open_source_code_node_SASModelStudio.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30406i0EB67F0892F70942/image-size/large?v=v2&amp;amp;px=999" role="button" title="open_source_code_node_SASModelStudio.png" alt="open_source_code_node_SASModelStudio.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These operations are not supported because the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="xisDoc-windowItem"&gt;Open Source Code&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;node does not generate SAS score code.&lt;/P&gt;&lt;DIV class="xisDoc-navLine"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="xisDoc-navLine"&gt;While looking for a solution, I stumbled upon &lt;A href="http://cinsug.org/uploads/3/6/2/9/36298586/winand_sas_and_open_source.pdf" target="_blank" rel="noopener"&gt;this&lt;/A&gt;:&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="open_source_code_node_SASEM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30405i841E0576C15FCB5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="open_source_code_node_SASEM.png" alt="open_source_code_node_SASEM.png" /&gt;&lt;/span&gt;Is a comparable solution possible for the Open Source Code Node in SAS Model Studio on Viya?&lt;/DIV&gt;</description>
      <pubDate>Wed, 19 Jun 2019 09:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/567186#M433</guid>
      <dc:creator>RVB</dc:creator>
      <dc:date>2019-06-19T09:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Model Studio open source code node - generate score code with PMML</title>
      <link>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569052#M434</link>
      <description>&lt;P&gt;The Coding on SAS Viya Community is sunsetting and all threads have moved to the Developers Community. Moving this thread now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/224827"&gt;@RVB&lt;/a&gt;, I'll look into finding someone to answer your question.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 11:52:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569052#M434</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2019-06-26T11:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Model Studio open source code node - generate score code with PMML</title>
      <link>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569418#M451</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/224827"&gt;@RVB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I received the following response to your question from a colleague of mine:&lt;/P&gt;
&lt;P&gt;This is a little bit hacky but:&lt;/P&gt;
&lt;UL class="y-list y-list__unordered yj-redraft-list"&gt;
&lt;LI class="y-list--item"&gt;One solution would be to perform the Python/R model to PMML conversion inside the node and save the output PMML in an accessible location.
&lt;UL class="y-list y-list__unordered yj-redraft-list"&gt;
&lt;LI class="y-list--item"&gt;For R you can use the PMML package or r2pmml package&lt;/LI&gt;
&lt;LI class="y-list--item"&gt;For Python, you can use nyoka or sklearn2pmml&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="y-list--item"&gt;Validate that the output PMML file confirms to the v4.2 standard that SAS supports up to&lt;/LI&gt;
&lt;LI class="y-list--item"&gt;PMML file can be converted by importing into Model Manager via GUI, or you could have your PMML file in your SAS lib and invoke PROC PSCORE directly in SAS Studio.
&lt;UL class="y-list y-list__unordered yj-redraft-list"&gt;
&lt;LI class="y-list--item"&gt;Upon success, you should have a 'score.sas' file&lt;/LI&gt;
&lt;LI class="y-list--item"&gt;If not, this means the PMML file did not conform to the v4.2 standard we support&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a code example below based off the R RandomForest example on our public GitHub - it's a bit spaghetti since I don't know R &lt;STRONG&gt;but the key is you must output the PMML file in an accessible directory&lt;/STRONG&gt;, either by changing 'dm_nodedir' or use the R function 'setwd()' which I did (for Python, do the equivalent as well)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. To state the obvious - this requires Model Manager licensed since PROC PSCORE is bundled with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Joe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 13:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569418#M451</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2019-06-27T13:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Model Studio open source code node - generate score code with PMML</title>
      <link>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569431#M452</link>
      <description>&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robbe&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 13:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Model-Studio-open-source-code-node-generate-score-code-with-PMML/m-p/569431#M452</guid>
      <dc:creator>RVB</dc:creator>
      <dc:date>2019-07-30T13:25:55Z</dc:date>
    </item>
  </channel>
</rss>

