machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

out of memory exception

Open amirjalali1 opened this issue 7 years ago • 7 comments

I'm using fasttree to train my model but the program always crashes with the low on memory exception. I have an hp dl380 gen 8 with 64gig of ram and 2x 2620 xenon and windows server 2016. why the program crashes? shouldn't it handles low on memory? is there anything i can do so it limits memory usage?

amirjalali1 avatar Mar 26 '19 11:03 amirjalali1

Did you try this?

Check your Build Properties. "Prefer 32-bit" should be unchecked.

link

WaldiTUD avatar Mar 26 '19 14:03 WaldiTUD

@WaldiTUD yes, it's a simple 64bit .net core app published for win64 i'm ok with training time on ml like scikitlearn in python but i think out of memory should not happen. im going to run the same pipeline on sickitlearn

amirjalali1 avatar Mar 26 '19 15:03 amirjalali1

I don't think, that it has to with ML.NET.

For .net Core you have to set the environment variable Try this

Or try it with Framework

WaldiTUD avatar Mar 26 '19 16:03 WaldiTUD

Hi @1amirjalai. How big is your dataset, how many features? What does the rest of the pipeline looks like?

It is hard to say where is the memory consumption from without more informations. If it is truly FastTree taking up a lot of memory you can try to turn on the DiskTranspose option.

var ap2 = mlContext.BinaryClassification.Trainers.FastTree(new FastTreeBinaryTrainer.Options
{
   DiskTranspose = true
 });

sfilipi avatar Mar 26 '19 17:03 sfilipi

Hi @sfilipi How big ? it's not that big it's 4 gig csv file withe 132 feature and 13 million records . What does the rest of the pipeline looks like? csv file features are all in the correct format so there is no need for further transformation only three features have textfeaturizing transformation.

Today i'm gonna reduce the features to see what will happen. The features reduced to 8 columns. it is past about 24 hours but the fit method is still running and no result is getting back.

amirjalali1 avatar Mar 27 '19 10:03 amirjalali1

Closing this issue as no further updates on the issue have been given. @1amirjalai feel free to reopen the issue if you can provide more information. Thanks.

mstfbl avatar Apr 21 '20 03:04 mstfbl

this issue is happening to me too. sometimes by removing package from UWP project and installing again it work perfectly but other times it's really painful to get a build! Please fix it! I removed every line of code related to ml.net package however the problem is due to the package itself so it would not fix it! and the problem is not because of my code.

Jahanaray avatar Aug 29 '20 17:08 Jahanaray