From issues-return-184436-archive-asf-public=cust-asf.ponee.io@spark.apache.org Thu Feb 8 21:08:11 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id EB19818064F for ; Thu, 8 Feb 2018 21:08:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D93C0160C5E; Thu, 8 Feb 2018 20:08:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2EC23160C34 for ; Thu, 8 Feb 2018 21:08:11 +0100 (CET) Received: (qmail 43367 invoked by uid 500); 8 Feb 2018 20:08:10 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 43357 invoked by uid 99); 8 Feb 2018 20:08:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Feb 2018 20:08:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id CE744C248B for ; Thu, 8 Feb 2018 20:08:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id TTgDpvqn9j2v for ; Thu, 8 Feb 2018 20:08:09 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 84E6C5FB58 for ; Thu, 8 Feb 2018 20:08:08 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3E974E0254 for ; Thu, 8 Feb 2018 20:08:06 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id EE9B22410A for ; Thu, 8 Feb 2018 20:08:03 +0000 (UTC) Date: Thu, 8 Feb 2018 20:08:03 +0000 (UTC) From: "Bryan Cutler (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-23244) Incorrect handling of default values when deserializing python wrappers of scala transformers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-23244?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D163= 57504#comment-16357504 ]=20 Bryan Cutler commented on SPARK-23244: -------------------------------------- This is same issue as SPARK-21685 caused by pyspark not differentiating fro= m defaults and set params when transferring values to Java. I think we can = close this and SPARK-23234 also. > Incorrect handling of default values when deserializing python wrappers o= f scala transformers > -------------------------------------------------------------------------= -------------------- > > Key: SPARK-23244 > URL: https://issues.apache.org/jira/browse/SPARK-23244 > Project: Spark > Issue Type: Bug > Components: MLlib > Affects Versions: 2.2.1 > Reporter: Tomas Nykodym > Priority: Minor > > Default values are not handled properly when serializing/deserializing py= thon trasnformers which are wrappers around scala objects. It looks like th= at after deserialization the default values which=C2=A0were based on uid do= not get properly restored and values which were not set are set to their (= original) default values. > Here's a simple code example using Bucketizer: > {code:python} > >>> from pyspark.ml.feature import Bucketizer > >>> a =3D Bucketizer()=20 > >>> a.save("bucketizer0") > >>> b =3D load("bucketizer0")=20 > >>> a._defaultParamMap[a.outputCol] > u'Bucketizer_440bb49206c148989db7__output' > >>> b._defaultParamMap[b.outputCol] > u'Bucketizer_41cf9afbc559ca2bfc9a__output' > >>> a.isSet(a.outputCol) > False=20 > >>> b.isSet(b.outputCol) > True > >>>=C2=A0a.getOutputCol() > u'Bucketizer_440bb49206c148989db7__output' > >>> b.getOutputCol() > u'Bucketizer_440bb49206c148989db7__output' > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org