Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80EBA19B3B for ; Thu, 7 Apr 2016 22:56:57 +0000 (UTC) Received: (qmail 71502 invoked by uid 500); 7 Apr 2016 22:56:53 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 71386 invoked by uid 500); 7 Apr 2016 22:56:53 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@spark.apache.org Received: (qmail 71376 invoked by uid 99); 7 Apr 2016 22:56:53 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2016 22:56:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E5479180535 for ; Thu, 7 Apr 2016 22:56:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pbSihW73FIty for ; Thu, 7 Apr 2016 22:56:51 +0000 (UTC) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id BDF1A5FB2A for ; Thu, 7 Apr 2016 22:56:50 +0000 (UTC) Received: by mail-yw0-f175.google.com with SMTP id t10so115399884ywa.0 for ; Thu, 07 Apr 2016 15:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=ZoJrx+GSfw8ZhwlkY9tsZ/jpwcq55Ote6/xO7Kw5I2w=; b=AJe5Gx2xDIcgizvByIELxkerIN4aBrjKMNMOTBa7G7sbSlkWvwvqTOimcdF97uZcIZ WlsdL+WwYdssCm+HnswIpLR59DoV41wLea6g1JxyL5kFicrlEGkM/3ECPfsmJYgM83WW ASoa8xUKLJKjTaxGwrTiPI2UTGzYsH0VT0y2+yCcX37KgmgX7+MBb8f6NuZGnZ5/jLer Iekb28SxKjU3znmXEwf6S8HcBqIs+uM1kC7K+kaRE5awCfuqVgHXgz4zLcByGforHKIf Ibl+c0Ymc1OLbEqg8SczqhM+O3p61ImbE/0n/YGZ2qa094D0OEV3a9G/MZTXiycj62Re k5qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=ZoJrx+GSfw8ZhwlkY9tsZ/jpwcq55Ote6/xO7Kw5I2w=; b=JD5uyf+/VUuZEzGu3UBw/mSY8cOURApwRp9xe6XH1jO2Ilj6kh9CYJPlG7n5nKcfzj 5kgh7QPT1jEym/blCELPU0FFivPhd4VEEP4+JeOWBw2luUTrv37w7iBR0H6b0CiIQU3X VV69iPf1m8205Ys8jQFvoXwaFmAhCCfia7HFwmi7mg80nAVgBnCChOfDJy/5i2BfOe4k S8PMHmooIkYskeH0sFE71jWHBH1wSvPh4puYTSs+loYiHR9qPbnIhbVXGQjLoPjm4Kae S3fWxTl2FDVW6wLbDNtuQJajryDmQ7R8v2YTFDqZYYRU8+7OAx4UJL/s0ba2H9VqjzHT MFAg== X-Gm-Message-State: AD7BkJJrKgQl4ek4gG+qnE09CRxaKBv/z8qELciKJtoDCX+GiW48t8Z5WSNlKawAUsa7bSv7zOkNAw+ux+rHkg== MIME-Version: 1.0 X-Received: by 10.129.89.215 with SMTP id n206mr3117691ywb.270.1460069810192; Thu, 07 Apr 2016 15:56:50 -0700 (PDT) Received: by 10.37.210.74 with HTTP; Thu, 7 Apr 2016 15:56:50 -0700 (PDT) Date: Thu, 7 Apr 2016 15:56:50 -0700 Message-ID: Subject: MLlib ALS MatrixFactorizationModel.save fails consistently From: Colin Woodbury To: user Content-Type: multipart/alternative; boundary=001a1147ec326248a0052fecfe67 --001a1147ec326248a0052fecfe67 Content-Type: text/plain; charset=UTF-8 Hi all, I've implemented most of a content recommendation system for a client. However, whenever I attempt to save a MatrixFactorizationModel I've trained, I see one of four outcomes: 1. Despite "save" being wrapped in a "try" block, I see a massive stack trace quoting some java.io classes. The Model isn't written. 2. Same as the above, but the Model *is* written. It's unusable however, as it's missing many of the files it should have, particularly in the "product" folder. 3. Same as the above, but sbt crashes completely. 4. No massive stack trace, and the Model seems to be written. Upon being loaded by another Spark context and fed a user ID, it claims the user isn't present in the Model. Case 4 is pretty rare. I see these failures both locally and when I test on a Google Cloud instance with much better resources. Note that `ALS.trainImplicit` and `model.save` are being called from within a Future. Could it be possible that Play threads are closing before Spark can finish, thus interrupting it somehow? We are running Spark 1.6.1 within Play 2.4 and Scala 2.11. All these failures have occurred while in Play's Dev mode in SBT. Thanks for any insight you can give. --001a1147ec326248a0052fecfe67 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I've implemented m= ost of a content recommendation system for a client. However, whenever I at= tempt to save a MatrixFactorizationModel I've trained, I see one of fou= r outcomes:

1. Despite "save" being wrapped in = a "try" block, I see a massive stack trace quoting some java.io classes. The Model isn't written.
2. Same as the above, but the Model *is* written. It's unusabl= e however, as it's missing many of the files it should have, particular= ly in the "product" folder.
3. Same as the above, b= ut sbt crashes completely.
4. No massive stack trace, and the= Model seems to be written. Upon being loaded by another Spark context and = fed a user ID, it claims the user isn't present in the Model.
=

Case 4 is pretty rare. I see these failures both locall= y and when I test on a Google Cloud instance with much better resources.
Note that `ALS.trainImplicit` and `model.save` are being ca= lled from within a Future. Could it be possible that Play threads are closi= ng before Spark can finish, thus interrupting it somehow?
We are running Spark 1.6.1 within Play 2.4 and Scala 2.11. All thes= e failures have occurred while in Play's Dev mode in SBT.

= Thanks for any insight you can give.
--001a1147ec326248a0052fecfe67--