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)
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.
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.
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 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.
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.
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.