BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ivank
Fluorite | Level 6

Hi,

 

SAS EG is crashing for me when I want to use the score model node.

 

The model is built in Miner and packaged and deployed in Model manager. 

 

When I add the score model node in SAS EG, it takes a while to apply the selected model from the repository (10 min!) and the PC gets very worked up.

 

After mapping the variables and selecting exports and trying to run the export, I get the following pop-up

 

Exception of type 'System.OutOfMemoryException' was thrown.


-------------------------- Technical Information Follows --------------------------

Exception Details:
----------------------------------------
Exception type: System.OutOfMemoryException
Message: Exception of type 'System.OutOfMemoryException' was thrown.
Source: mscorlib
Target Site: ToString

Stack Trace:
at System.Text.StringBuilder.ToString()
at System.IO.StreamReader.ReadToEnd()
at SAS.EG.Tasks.TaskSDK.TaskModel.WriteXml(Boolean verbose)
at SAS.EG.Tasks.TaskSDK.TaskModel.get_XmlState()
at SAS.Shared.AddIns.Management.AddInProxy.get_XmlState()
at SAS.EG.ProjectElements.EGTask.MarshaledReadXmlState()
at SAS.EG.ProjectElements.EGTask.ReadXmlState()
at SAS.EG.ProjectElements.EGTask.Show(IWin32Window Owner)
at SAS.EG.MainForm.AddTask(Guid taskGuid, Element inputData, Boolean bIsWizard, String xml, String templateName, String templateNameFullPath)
at SAS.EG.MainForm.LaunchTask(Element target, Guid taskGuid, Boolean bIsWizard, String xml, String templateName, String templateNameFullPath)
at SAS.EG.MainForm.OnTaskClick(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

From what I remember (again, not my area), the score code is often a part of a SAS program, but not a complete runnable item.  What the EG task does is create the "header" part of the DATA step (to map columns) and then append score code (which has all of the rules from your EM model).  You would need to create a code node that does the same thing.  That's why I suggested trying the task with a less complex model (if you have one handy) and use it as a template.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

8 REPLIES 8
ivank
Fluorite | Level 6

Forgot to mention, running 32bit EG 5.1, model built on EM 12.1. Machine is 64bit, with Win 7 and 16GB of ram and SSD.

ChrisHemedinger
Community Manager

I'm guessing this must be a very large model -- lots of variables and rules.  SAS EG is trying to load this into the Scoring task UI so that you can select variables to map.  Any idea how many variables?

 

You might need to write the score code -- the step that runs the score model -- by hand.  Later versions of EG might be a bit more robust in the extreme memory handling, but I'm not sure.  And if there are LOTS of variables to map you might find the UI to be overkill anyway.  

 

Do you have smaller models that work well?  You might be able to model your code in EG based on what the task generates for those.

 

If I'm way off, and the model is NOT all that large, then I think you should track this with SAS Tech Support.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ivank
Fluorite | Level 6
Hi Chris,

might be the case. It's worrying the read what you wrote about the robustness of EG. I might then put back the scoring in EM but there it's more tricky (12.1) to export back scores to the datawarehouse (Oracle) because manual re-write doesn't sound to be the best way to spend my time. Any tip in the SAS code for exporting scores from EM to Oracle?

Thanks, Ivan
ChrisHemedinger
Community Manager

It's not my area of expertise, but if the data is in Oracle you might look into in-database scoring, which can score the data without moving the data from the database.  The built-in EG task won't help with that, but the scoring might happen a lot faster. 

 

EG will happily submit and run your large score models from a code node.  The heavy lifting will be done by the SAS session (and maybe be I/O bound by your database access).  But this Scoring task has the additional constraint of loading a large model defintion into its UI for mapping.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ivank
Fluorite | Level 6
Hi Chris,

I tried exporting the score code (SAS version) from EM and apply in EG as a SAS code (attach right after the scoring dataset) but got tons of errors. I was hoping that to be the workaround but perhaps I am missing something.

Br,
Ivan
ChrisHemedinger
Community Manager

From what I remember (again, not my area), the score code is often a part of a SAS program, but not a complete runnable item.  What the EG task does is create the "header" part of the DATA step (to map columns) and then append score code (which has all of the rules from your EM model).  You would need to create a code node that does the same thing.  That's why I suggested trying the task with a less complex model (if you have one handy) and use it as a template.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
ivank
Fluorite | Level 6
Hi Chris,

thanks, you've given me some options to explore.

These type of solutions always make me feel that SAS is capable but equally non-intuitive or well-documented. But that's the long week filled with EG crashes talking.

Have a great weekend!

/Ivan
ivank
Fluorite | Level 6

Hi Chris,

 

so to just come back and verify, yes, I used your suggestion as a solution (EG does template / EM optimized source score code embed for the more complex model).

 

Thanks again for your great help!

 

Ivan

sas-innovate-2024.png

Today is the last day to save with the early bird rate! Register today for just $695 - $100 off the standard rate.

 

Plus, pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1742 views
  • 2 likes
  • 2 in conversation