From dev-return-4367-archive-asf-public=cust-asf.ponee.io@madlib.apache.org Tue Apr 9 22:22:47 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2F1C6180629 for ; Wed, 10 Apr 2019 00:22:47 +0200 (CEST) Received: (qmail 18064 invoked by uid 500); 9 Apr 2019 22:03:09 -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 18037 invoked by uid 99); 9 Apr 2019 22:03:09 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2019 22:03:09 +0000 From: GitBox To: dev@madlib.apache.org Subject: [GitHub] [madlib] khannaekta commented on a change in pull request #366: DL: Simplify madlib_keras_predict interface Message-ID: <155484856631.20818.9869059808443468260.gitbox@gitbox.apache.org> Date: Tue, 09 Apr 2019 22:22:46 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit khannaekta commented on a change in pull request #366: DL: Simplify madlib_keras_predict interface URL: https://github.com/apache/madlib/pull/366#discussion_r273724744 ########## File path: src/ports/postgres/modules/deep_learning/madlib_keras_predict.py_in ########## @@ -37,24 +37,33 @@ from madlib_keras_wrapper import convert_string_of_args_to_dict from madlib_keras_helper import CLASS_VALUES_COLNAME from madlib_keras_helper import KerasWeightsSerializer -def predict(schema_madlib, model_table, test_table, id_col, model_arch_table, - model_arch_id, independent_varname, compile_params, output_table, - **kwargs): - module_name = 'madlib_keras_predict' - input_tbl_valid(test_table, module_name) - input_tbl_valid(model_arch_table, module_name) - output_tbl_valid(output_table, module_name) - - # _validate_input_args(test_table, model_arch_table, output_table) +MODULE_NAME = 'madlib_keras_predict' +def predict(schema_madlib, model_table, test_table, id_col, + independent_varname, output_table, **kwargs): + model_summary_table = add_postfix(model_table, '_summary') + input_tbl_valid(model_table, MODULE_NAME) Review comment: We should probably validate `model_table` before calling `add_postfix()` to avoid failure if the tablename is passed in predicate as NULL ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services