GitHub user jinntrance opened a pull request:

    https://github.com/apache/spark/pull/4247

    [MLLIB] SPARK-4846: throw a RuntimeException and give users hints to 
increase the minCount

    When the vocabSize*vectorSize is larger than Int.MaxValue/8, we try to 
throw a RuntimeException. Because under this circumstance it would definitely 
throw an OOM when allocating memory to serialize the arrays 
syn0Global&syn1Global.   syn0Global&syn1Global are float arrays. Serializing 
them should need a byte array of more than 8*(size of syn0Global).
    Also if we catch an OOM even if vocabSize*vectorSize is less than 
Int.MaxValue/8, we should give users hints to increase the minCount or decrease 
the vectorSize.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jinntrance/spark w2v-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/4247.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4247
    
----
commit 57eeae0e2c4ff1b768b043ecce6096322c4cfdf5
Author: Joseph J.C. Tang <[email protected]>
Date:   2015-01-27T03:30:13Z

    throw a RuntimeException and give users hints regarding the 
vectorSize&minCount

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to