title: Azure Machine Learning Out of Memory Exception
body: <p>I have created a simple experiment that points to a csv file for the data that I want to check.  The CSV file is 70MB (about 800,000 lines).  The Experiment contains only the following tasks:
  1.  Get Data
  2.  Select Columns (removes 3 columns from the data)
  3.  Clean Missing Data (put in 0 values for missing data values)
  4.  Split Data (75% / 25%)
  5.  Linear Regression Algorithm
  6.  Train Model
  7.  Score Model</p>
  
  <p>When I run this the Train Model gets and out of memory exception.  I'm currently only using the Free version, but I looked at the limits to this and it doesn't seem like that is what is limiting it.  </p>
  
  <p>The Train Model step runs for about 10 seconds before it errors out.  All of the previous steps took less than 1 minute to run.</p>
  
  <p>Why am I getting this Out of memory exception.</p>
  
  <p>Error Log
  Record Starts at UTC 04/27/2017 13:17:40:</p>
  
  <pre><code>Run the job:"/dll "Microsoft.Analytics.Modules.TrainGenericModel.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.TrainGenericModel.Dll.TrainGenericModel;Run" /Output0 "..\..\Trained model\Trained model.ilearner" /learner "..\..\Untrained model\Untrained model.ilearner" /trainingData "..\..\Dataset\Dataset.dataset" /labelColumnIndexOrName "%7B%22isFilter%22%3Atrue%2C%22rules%22%3A%5B%7B%22ruleType%22%3A%22ColumnNames%22%2C%22columns%22%3A%5B%22TotalInvoicedOrders%22%5D%2C%22exclude%22%3Afalse%7D%5D%2C%22ui%22%3A%7B%22withRules%22%3Atrue%7D%7D"  /ContextFile "..\..\_context\ContextFile.txt""
  [Start] Program::Main
  [Start]     DataLabModuleDescriptionParser::ParseModuleDescriptionString
  [Stop]     DataLabModuleDescriptionParser::ParseModuleDescriptionString. Duration = 00:00:00.0041511
  [Start]     DllModuleMethod::DllModuleMethod
  [Stop]     DllModuleMethod::DllModuleMethod. Duration = 00:00:00.0000326
  [Start]     DllModuleMethod::Execute
  [Start]         DataLabModuleBinder::BindModuleMethod
  [Verbose]             moduleMethodDescription Microsoft.Analytics.Modules.TrainGenericModel.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.TrainGenericModel.Dll.TrainGenericModel;Run
  [Verbose]             assemblyFullName Microsoft.Analytics.Modules.TrainGenericModel.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
  [Start]             DataLabModuleBinder::LoadModuleAssembly
  [Verbose]                 Loaded moduleAssembly Microsoft.Analytics.Modules.TrainGenericModel.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca
  [Stop]             DataLabModuleBinder::LoadModuleAssembly. Duration = 00:00:00.0092214
  [Verbose]             moduleTypeName Microsoft.Analytics.Modules.TrainGenericModel.Dll.TrainGenericModel
  [Verbose]             moduleMethodName Run
  [Information]             Module FriendlyName : Train Model
  [Information]             Module Release Status : Release
  [Stop]         DataLabModuleBinder::BindModuleMethod. Duration = 00:00:00.0121124
  [Start]         ParameterArgumentBinder::InitializeParameterValues
  [Verbose]             parameterInfos count = 3
  [Verbose]             parameterInfos[0] name = learner , type = Microsoft.Analytics.MachineLearning.ILearner
  [Start]             CustomSerializationHandler::HandleArgumentString
  [Start]                 DotNetSerializationHandler::HandleArgumentString
  [Stop]                 DotNetSerializationHandler::HandleArgumentString. Duration = 00:00:00.0085176
  [Stop]             CustomSerializationHandler::HandleArgumentString. Duration = 00:00:00.0114152
  [Verbose]             parameterInfos[1] name = trainingData , type = Microsoft.Numerics.Data.Local.DataTable
  [Start]             DataTableDatasetHandler::HandleArgumentString
  [Stop]             DataTableDatasetHandler::HandleArgumentString. Duration = 00:00:02.8392062
  [Verbose]             parameterInfos[2] name = labelColumnIndexOrName , type = Microsoft.Analytics.Modules.Common.Dll.ColumnSelection
  [Stop]         ParameterArgumentBinder::InitializeParameterValues. Duration = 00:00:03.1559096
  [Verbose]         Begin invoking method Run ... 
  [ModuleOutput] LearnerDetails
  [ModuleOutput] 
  [ModuleOutput] {
  [ModuleOutput]  "InputName":Untrained model
  [ModuleOutput]  "LearnerKind":Microsoft.Analytics.MachineLearning.Local.BatchLinearRegressor
  [ModuleOutput] }
  [ModuleOutput] InputDataStructure
  [ModuleOutput] 
  [ModuleOutput] {
  [ModuleOutput]  "InputName":Dataset
  [ModuleOutput]  "Rows":621312
  [ModuleOutput]  "Cols":16
  [ModuleOutput]  "ColumnTypes":System.String,12,System.Int32,4
  [ModuleOutput] }
  [Stop]     DllModuleMethod::Execute. Duration = 00:00:06.7340783
  [Critical]     Error: Error 0138: Memory has been exhausted, unable to complete running of module.
  [Critical]     {"InputParameters":{"DataTable":[{"Rows":621312,"Columns":16,"estimatedSize":364380160,"ColumnTypes":{"System.String":12,"System.Int32":4},"IsComplete":true,"Statistics":{"0":[36,0],"1":[3,0],"2":[8,0],"3":[6.3737912675113311,6.0,0.0,12.0,3.6860947075263715,13.0,0.0],"4":[608.87559390451179,312.0,0.0,2057.0,629.92222860055733,210.0,0.0],"5":[63210657.808690317,87803073.0,0.0,99429245.0,40023846.6134889,2314.0,0.0],"6":[11.006466960238978,8.0,0.0,35.0,8.3750399881698172,25.0,0.0],"7":[15630,0],"8":[34078,0],"9":[6912,0],"10":[7132,0],"11":[12459,0],"12":[17,0],"13":[2693,0],"14":[4481,0],"15":[4481,0]}}],"Learner":[{"LearnerKind":"learner","LearnerSettings":{"name":"BatchLinearRegressor","isTrained":false,"settings":[["Bias","True"],["Regularization","0.001"],["AllowUnknownLevels","True"],["RandomNumberSeed",""]],"weights":[]}}],"Generic":{"labelColumnIndexOrName":"{\"isFilter\":true,\"rules\":[{\"ruleType\":\"ColumnNames\",\"columns\":[\"TotalInvoicedOrders\"],\"exclude\":false}],\"ui\":{\"withRules\":true}}"}},"OutputParameters":[],"ModuleType":"Microsoft.Analytics.Modules.TrainGenericModel.Dll","ModuleVersion":" Version=6.0.0.0","AdditionalModuleInfo":"Microsoft.Analytics.Modules.TrainGenericModel.Dll, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.Analytics.Modules.TrainGenericModel.Dll.TrainGenericModel;Run","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0138: Memory has been exhausted, unable to complete running of module.","Warnings":[],"Duration":"00:00:06.7274218"}
  Module finished after a runtime of 00:00:07.2184726 with exit code -2
  Module failed due to negative exit code of -2
  
  Record Ends at UTC 04/27/2017 13:17:48.
  </code></pre>