From dev-return-2845-archive-asf-public=cust-asf.ponee.io@madlib.apache.org Thu Feb 22 19:28:09 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BCDCA18064E for ; Thu, 22 Feb 2018 19:28:08 +0100 (CET) Received: (qmail 51196 invoked by uid 500); 22 Feb 2018 18:28:07 -0000 Mailing-List: contact dev-help@madlib.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@madlib.apache.org Delivered-To: mailing list dev@madlib.apache.org Received: (qmail 51173 invoked by uid 99); 22 Feb 2018 18:28:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Feb 2018 18:28:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 041ADF2162; Thu, 22 Feb 2018 18:28:06 +0000 (UTC) From: iyerr3 To: dev@madlib.apache.org Reply-To: dev@madlib.apache.org References: In-Reply-To: Subject: [GitHub] madlib pull request #237: Bugfix: MLP predict using 1.12 model fails on late... Content-Type: text/plain Message-Id: <20180222182806.041ADF2162@git1-us-west.apache.org> Date: Thu, 22 Feb 2018 18:28:06 +0000 (UTC) Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/madlib/pull/237#discussion_r169845958 --- Diff: src/ports/postgres/modules/convex/mlp_igd.py_in --- @@ -749,8 +749,18 @@ def mlp_predict(schema_madlib, summary['layer_sizes'], array_type="DOUBLE PRECISION") is_classification = int(summary["is_classification"]) is_response = int(pred_type == 'response') - grouping_col = '' if summary['grouping_col']=='NULL' \ - else summary['grouping_col'] + if 'grouping_col' in summary: + # This model was created in MADlib 1.13 or greater version + is_v112_model = False --- End diff -- I prefer calling the flag `is_pre_113_model` as that makes the intention clearer. ---